I am just getting started with Vim and setting up the environment with some of the plugins recommended by http://vimawesome.com/. I downloaded and placed plug.vim in C:\Program Files\Vim\vim74\autoload
and in C:\Program Files\Vim\vimfiles\plugin I put the git master branch nerdtree-master and renamed it to nerdtree. In the _vimrc file, which is otherwise working, I put
Plug 'scroloose/nerdtree
and
Plug 'nerdtree
Neither of these commands worked. And I receive this error:
Error detected while processing C:\Program Files\Vim\_vimrc:
line 7:
E492: Not an editor command: Plug 'nerdtree'
Error detected while processing
C:\Program Files\Vim\vim74\plugin\nerdtree\lib\nerdtree\path.vim:
I finally figured out that I had forgot to wrap the line Plug 'nerdtree' with
call plug#begin('~/.vim/plugged')
Plug 'nerdtree'
call plug#end()
Although .vim is a Linux path, Vim or Vim-Plug was able to recognize the path. I then received an error that Git must be installed. I already had Git installed, so I simply added C:\Program Files\Git\bin to the system environment variable %PATH%. After restarting Vim I typed
:PlugInstall
in the Vim editor.
The vim-plug plugin manager got to work and printed:
- Finishing ... Done!
x nerdtree:
Cloning into 'C:\Users\labbedz7\.vim\plugged\nerdtree'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://git::#github.com/vim-scripts/nerdtree.git/'
Now, Git did not "authenticate" because the string in Plug 'String' refers to the GitHub URL path: http://github.com/String. By changing to the actual path: scrooloose/nerdtree I was able to run :PlugInstall again.
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree'
call plug#end()
This resulted in:
Updated. Elapsed time: 5.706874 sec.
[=]
- Finishing ... Done!
- nerdtree: Checking connectivity... done
I then added these lines to _vimrc:
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
Nerdtree is now running! It starts in Windows\System32 and is a bit slow to load, but it is running.
Related
I'm having trouble getting the Windows build agent to run a build. The agent is unable to checkout my source code. (Im using Windows 10) See GitHub issue
I am seeing the following error when running a build:
Buildkite Error: There was an error running `git clone -v -- git#github.com:myorg/myrepo.git .` (exec: "git": executable file not found in %PATH%)
I have installed git using chocolatey and git is accessible in CMD and Powershell on the agent's host and I can see it in my path if I run gci env:Path in Powershell. git's directory is at the end here:
C:\Program Files\Docker\Docker\Resources\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cm...
From a build's logs in BK's web UI, I see the following environment variables printed out:
BUILDKITE=true
BUILDKITE_AGENT_ACCESS_TOKEN=xxx
BUILDKITE_AGENT_DEBUG=true
BUILDKITE_AGENT_ENDPOINT=https://agent.buildkite.com/v3
BUILDKITE_AGENT_ID=xxx
BUILDKITE_AGENT_NAME=DESKTOP-1
BUILDKITE_AGENT_PID=5180
BUILDKITE_ARTIFACT_PATHS=
BUILDKITE_BIN_PATH=C:\Users\Jason\Downloads\buildkite-agent-windows-amd64-3.0-beta.27
BUILDKITE_BRANCH=fix/build
BUILDKITE_BUILD_CHECKOUT_PATH=builds\DESKTOP-1\myorg\myrepo
BUILDKITE_BUILD_CREATOR=Jason
BUILDKITE_BUILD_CREATOR_EMAIL=myemail#gmail.com
BUILDKITE_BUILD_ID=xxx
BUILDKITE_BUILD_NUMBER=18
BUILDKITE_BUILD_PATH=builds
BUILDKITE_BUILD_URL=https://buildkite.com/myorg/myrepo/builds/18
BUILDKITE_COMMAND=msbuild
BUILDKITE_COMMAND_EVAL=true
BUILDKITE_COMMIT=HEAD
BUILDKITE_GIT_CLEAN_FLAGS=-fxdq
BUILDKITE_GIT_CLONE_FLAGS=-v
BUILDKITE_HOOKS_PATH=hooks
BUILDKITE_JOB_ID=xxx
BUILDKITE_MESSAGE=First build
BUILDKITE_ORGANIZATION_SLUG=myorg
BUILDKITE_PIPELINE_DEFAULT_BRANCH=master
BUILDKITE_PIPELINE_PROVIDER=github
BUILDKITE_PIPELINE_SLUG=myrepo
BUILDKITE_PLUGINS_PATH=plugins
BUILDKITE_PROJECT_PROVIDER=github
BUILDKITE_PROJECT_SLUG=myorg/myrepo
BUILDKITE_PULL_REQUEST=false
BUILDKITE_PULL_REQUEST_REPO=
BUILDKITE_REPO=git#github.com:myorg/myrepo.git
BUILDKITE_REPO_SSH_HOST=github.com
BUILDKITE_RETRY_COUNT=0
BUILDKITE_SCRIPT_PATH=msbuild
BUILDKITE_SOURCE=ui
BUILDKITE_SSH_FINGERPRINT_VERIFICATION=true
BUILDKITE_TAG=
BUILDKITE_TIMEOUT=false
CI=true
PATH=C:\Users\Jason\Downloads\buildkite-agent-windows-amd64-3.0-beta.27;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
Note that PATH in that output is not the same as my PATH from the Powershell and does not include the path to gits binary.
Full build output:
Build environment variables 0s
BUILDKITE=true
BUILDKITE_AGENT_ACCESS_TOKEN=xxx
BUILDKITE_AGENT_DEBUG=true
BUILDKITE_AGENT_ENDPOINT=https://agent.buildkite.com/v3
BUILDKITE_AGENT_ID=xxx
BUILDKITE_AGENT_NAME=DESKTOP-1
BUILDKITE_AGENT_PID=5180
BUILDKITE_ARTIFACT_PATHS=
BUILDKITE_BIN_PATH=C:\Users\Jason\Downloads\buildkite-agent-windows-amd64-3.0-beta.27
BUILDKITE_BRANCH=fix/build
BUILDKITE_BUILD_CHECKOUT_PATH=builds\DESKTOP-1\myorg\myrepo
BUILDKITE_BUILD_CREATOR=Jason
BUILDKITE_BUILD_CREATOR_EMAIL= myemail#gmail.com
BUILDKITE_BUILD_ID=xxx
BUILDKITE_BUILD_NUMBER=18
BUILDKITE_BUILD_PATH=builds
BUILDKITE_BUILD_URL=https://buildkite.com/myorg/myrepo/builds/18
BUILDKITE_COMMAND=msbuild
BUILDKITE_COMMAND_EVAL=true
BUILDKITE_COMMIT=HEAD
BUILDKITE_GIT_CLEAN_FLAGS=-fxdq
BUILDKITE_GIT_CLONE_FLAGS=-v
BUILDKITE_HOOKS_PATH=hooks
BUILDKITE_JOB_ID=xxx
BUILDKITE_MESSAGE=First build
BUILDKITE_ORGANIZATION_SLUG=myorg
BUILDKITE_PIPELINE_DEFAULT_BRANCH=master
BUILDKITE_PIPELINE_PROVIDER=github
BUILDKITE_PIPELINE_SLUG=myrepo
BUILDKITE_PLUGINS_PATH=plugins
BUILDKITE_PROJECT_PROVIDER=github
BUILDKITE_PROJECT_SLUG=myorg/myrepo
BUILDKITE_PULL_REQUEST=false
BUILDKITE_PULL_REQUEST_REPO=
BUILDKITE_REPO=git#github.com:myorg/myrepo.git
BUILDKITE_REPO_SSH_HOST=github.com
BUILDKITE_RETRY_COUNT=0
BUILDKITE_SCRIPT_PATH=msbuild
BUILDKITE_SOURCE=ui
BUILDKITE_SSH_FINGERPRINT_VERIFICATION=true
BUILDKITE_TAG=
BUILDKITE_TIMEOUT=false
CI=true
PATH=C:\Users\Jason\Downloads\buildkite-agent-windows-amd64-3.0-beta.27;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
Running global environment hook 0s
# Skipping, no hook script found at "hooks\environment.bat"
Running global pre-checkout hook 0s
# Skipping, no hook script found at "hooks\pre-checkout.bat"
Preparing build directory 0s
# Changing working directory to "builds\DESKTOP-1\myorg\myrepo"
⚠ Buildkite Warning: Could not performn `ssh-keygen` (exec: "ssh-keygen": executable file not found in %PATH%)
> git clone -v -- git#github.com:myorg/myrepo.git .
🚨 Buildkite Error: There was an error running `git clone -v -- git#github.com:myorg/myrepo.git .` (exec: "git": executable file not found in %PATH%)
Your build output doesn't seem to have those chocolatey paths:
PATH=C:\Users\Jason\Downloads\buildkite-agent-windows-amd64-3.0-beta.27;
You might need to add an agent environment hook which adds the right directories to the path. Or try updating to the latest beta which might fix the issue.
I'm using 64 bit git-for-windows 2.12.2 under Windows7 64 bit system. Also, I have 64 bit TortoiseGit 2.4.0 installed under E:\Program Files\TortoiseGit. Now, I have try to set the tortoisegitmerge.exe as a merge tool, then use it under either bash and git gui.
Here is my setting of global .gitconfig file:
[merge]
tool = tortoisemerge
[mergetool "tortoisemerge"]
path = E:\\Program Files\\TortoiseGit\\bin\\TortoiseGitMerge.exe
This setting is from the one answer here: git - Why doesn't tortoisemerge work as my mergetool? - Stack Overflow
This works fine if I try to launch the merge tool from the command line, see the log below:
123#123-PC MINGW64 /d/code/cb/cb_sf_git/trunk (test_merge_gui|AM 3/19)
$ git mergetool
Merging:
src/CodeBlocks_wx31.cbp
Normal merge conflict for 'src/CodeBlocks_wx31.cbp':
{local}: modified file
{remote}: modified file
123#123-PC MINGW64 /d/code/cb/cb_sf_git/trunk (test_merge_gui|AM 3/19)
$ git am --continue
You can see the image shot of the opened window after I run git mergetool, it looks like tortoisegitmerge already fix the conflict, so I just click Save button, and close the tortoisegitmerge, and run git am --continue.
But when conflict happens, I can open the git gui gui tool, and see the image shot here, look, it shows one conflict here.
When I right click and click the "merge tool" context menu, I get such error message box, it said: "Unsupported merge tool 'tortoisemerge'", see image shot below:
While, I have tried other settings in .gitconfig, such as this one:
[merge]
tool = tortoisemerge
[mergetool "tortoisemerge"]
cmd = '"E:/Program Files/TortoiseGit/bin/TortoiseGitMerge.exe" -base:"$BASE" -theirs:"$REMOTE" -mine:"$LOCAL" -merged:"$MERGED"'
But there are still other errors when launched either from bash, see below:
123#123-PC MINGW64 /d/code/cb/cb_sf_git/trunk (test_merge_gui|AM 3/19)
$ git mergetool
Merging:
src/CodeBlocks_wx31.cbp
Normal merge conflict for 'src/CodeBlocks_wx31.cbp':
{local}: modified file
{remote}: modified file
/mingw64/libexec/git-core/git-mergetool--lib: line 128: E:/Program Files/TortoiseGit/bin/TortoiseGitMerge.exe -base:$BASE -theirs:$REMOTE -mine:$LOCAL -merged:$MERGED: No such file or directory
src/CodeBlocks_wx31.cbp seems unchanged.
Was the merge successful [y/n]?
While try to launch the merge tool from context menu of git gui, I get the same message box saying "Unsupported merge tool 'tortoisemerge'".
I have tried other settings of the cmd or path field, but without any luck, all get failed.
Any one can help? Thanks.
EDIT: I have tried all the settings in this stackoverflow questions: Why can't I use TortoiseMerge as my git merge tool on Windows? - Stack Overflow, but no luck, all are failed with the same error.
After debugging for a while, I think I have totally fix this issue, just add a code snippet in the file mergetool.tcl.
tortoisemerge {
#set cmdline [list "$merge_tool_path" -base:"$BASE" -mine:"$LOCAL" -theirs:"$REMOTE" -merged:"$MERGED"]
#Note: no quote around the $BASE like variables, because those cause escaped quote
#and it looks like TortoiseGitMerge does not support such formats.
set cmdline [list "$merge_tool_path" -base:$BASE -mine:$LOCAL -theirs:$REMOTE -merged:$MERGED]
}
Then the problem could be solved. See some discussion here: google group discussion.
My VS Code integrated terminal is only toggling up for a second then disappearing with the command Ctrl+`(Tried to change it - still not working :)),
showing the Integrated terminal exited with code 1 error.
Any ideas for fixing it?
I had the same problem on Windows 10. The problem was that I had VSCode running in compatibility mode (Windows 8). If that is that case for you, just uncheck "Run this program in compatibility mode for" checkbox in Compatibility tab of the VSCode properties, click in OK and restart VSCode.
I had the same problem just a few minutes ago, in my case this error was a path consequence, my windows user folder has an accent (c:/users/josé /..) , so, just try to move your project into another folder, like "C:/projects".
Current Solution is using a none-English named Folder as project Folder.
Here is my research:
default value "terminal.integrated.shell.windows": "C:\\WINDOWS\\system32\\cmd.exe"
Following is the debug info in VScode:
terminalInstance.ts:55 Integrated terminal exited with code 1
(anonymous function) # terminalInstance.ts:55
emitTwo # events.js:100
emit # events.js:185
ChildProcess._handle.onexit # internal/child_process.js:204
Following is debug info in Atom:
C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:52
Unable to start terminal process. Win32 error code: 267 Error: Unable
to start terminal process. Win32 error code: 267
at Error (native)
at Server. (C:\Users\mzvast.atom\packages\platformio-ide-terminal\node_modules\pty.js\lib\pty_win.js:67:9)
at emitOne (events.js:90:13)
at Server.emit (events.js:182:7)
at Pipe.onconnection (net.js:1439:8)
(anonymous function) #C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:52
(anonymous function) #C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:126
module.exports.Emitter.simpleDispatch # C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\node_modules\event-kit\lib\emitter.…:25
module.exports.Emitter.emit # C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\node_modules\event-kit\lib\emitter.…:125
(anonymous function) # C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:78emitTwo
# events.js:100
emit # events.js:185
handleMessage # internal/child_process.js:718
channel.onread # internal/child_process.js:444
The win32 error code 267 seem to be,according to microsoft:
ERROR_DIRECTORY
267 (0x10B)
The directory name is invalid.
Close vscode, create a new folder somewhere on your pc, but not inside the directory which was previously opened with vscode. Open this new directory with vscode and then try opening your terminal. If your terminal opens, then the problem was with your previous directory. This happened with me, the directory didn't exist but was listed in my file explorer. Now, whenever your start your terminal, it will start with the same directory which is opened in your vscode. In this case, the directory didn't exist or had same issues, hence the problem.
Important!!
First, try this method.
Create a dummy directory anywhere on your PC, except the present directory that
is open in your Explorer.
Save any thing that is open.
Open the dummy directory that you created File > Open a folder > 'Your Folder'
Try opening integrated terminal using View > Terminal.
If this works, then there's a problem with the directory. Create a new directory and migrate all files to that directory.
If not, then try changing the settings listed here in other answers or check whether VSCode is running in Compatibility Mode or not.
I had the same Exit code 1.. And found the solution as below..
Open the settings on Visual Studio Code and click Edit in settings.json as marked:
Change the terminal.integrated.shell.windows settings on the red marked line as you see:
just uncheck "Run this program in compatibility mode for" checkbox in Compatibility tab of the VSCode properties, click in OK and apply and restart VSCode.
I am trying to install rebar3 using the git console.I have erlang installed and the path is set to C:\Program Files\erl7.3\bin
Here are the steps which I followed :
$ git clone https://github.com/erlang/rebar3.git
$ cd rebar3
$./bootstrap
On hitting bootstrap ,I get the following error
escript: exception throw: {error,{rebar_prv_update,package_index_write}}
in function rebar_prv_update:do/1 (src/rebar_prv_update.erl, line 77)
in call from rebar_core:do/2 (src/rebar_core.erl, line 125)
in call from erl_eval:do_apply/6 (erl_eval.erl, line 670)
in call from escript:eval_exprs/5 (escript.erl, line 871)
in call from erl_eval:local_func/6 (erl_eval.erl, line 557)
in call from escript:interpret/4 (escript.erl, line 787)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_it/1 (init.erl, line 1055)
Any suggestions on how to solve this?
Please take a look at the following github issue.
My user home directory was pointed to a network location. I removed the network location from My Computer and was able to build rebar3 successfully.
I'm trying to install Ant on Windows 7 using these instructions, but at stage 5, when I run the command ant -f fetch.xml -Ddest=system, I get the following error:
Buildfile: C:\Program Files\WinAnt\fetch.xml
pick-dest:
[echo] Downloading to C:\Program Files\WinAnt\lib
probe-m2:
download-m2:
[echo] Downloading to C:\Program Files\WinAnt\lib
[get] Getting: http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0. /maven-artifact-ant-2.0.4-dep.jar
[get] To: C:\Program Files\WinAnt\lib\maven-artifact-ant-2.0.4-dep.jar
[get] Error opening connection java.io.FileNotFoundException: http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar
[get] Error opening connection java.io.FileNotFoundException: http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar
[get] Error opening connection java.io.FileNotFoundException: http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar
[get] Can't get http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar to C:\Program Files\WinAnt\lib\maven-artifact-ant-2.0.4-dep.jar
BUILD FAILED
C:\Program Files\WinAnt\get-m2.xml:85: Can't get http://ibiblio.org/maven2//org/apach/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar to C:\Program Files\WinAnt\lib\maven-artifact-ant-2.0.4-dep.jar
Total time: 1 second
I understand that the URL is not reachable, so I tried to enter this URL into my browser, and indeed it does not exist. I found the file maven-artifact-ant-2.0.4-dep.jar at:
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar
instead. So how can I fix this problem?
Just need to update the m2.url property in the lib/library.properties file to http://mirrors.ibiblio.org/pub/mirrors/maven2.
Run ANT as follows
$ ant -f $ANT_HOME/fetch.xml -Ddest=user -Dm2.url=http://repo1.maven.org/maven2
The m2.url property needs to be overloaded. The following property file in ANT needs to be updated:
$ANT_HOME/lib/libraries.properties
Using a now deprecated Maven Central URL
The URL is correct, but you're trying to download the files into a subfolder of Program Files (C:\Program Files\WinAnt\lib). To do so you need to be running your commands with Administrator rights.
So right click on your Command Prompt shortcut and select "run as administrator" or enter "cmd" into the search field of the start menu and press CTRL + SHIFT + ENTER.
Then try to run the ant command again:
ant -f fetch.xml -Ddest=system
And if you have trouble downloading any other files using the script, it seems to work well to just download them using your browser, put them in the right place, and then edit fetch.xml to not download the file.