Whenever I load VIM 7.0 on my machine I understand that the program loads a lot of things from the path /usr/share/vim/vim70/. Now I have install locally (in the path ./vim74/src/vim) the new version of VIM because I am not a sudo user. The problem I have is that it looks like program is searching for files in a directory that does not exist i.e. /usr/local/share/vim/. I cannot create such a directory so I wondered how could I set vim to look in the correct directory?
For reference I get error messages like
Error detected while processing /home/hep/flr09/.vimrc:
line 51:
E484: Can't open file /usr/local/share/vim/syntax/syntax.vim
Warning: Cannot find word list "en.utf-8.spl" or "en.ascii.spl"
line 292:
E484: Can't open file /usr/local/share/vim/syntax/syntax.vim
Press ENTER or type command to continue
or like
Warning: Cannot find word list "en.utf-8.spl" or "en.ascii.spl"
Error detected while processing /home/hep/flr09/.vimrc:
line 292:
E484: Can't open file /usr/local/share/vim/syntax/syntax.vim
Press ENTER or type command to continue
The following command installs Vim in /home/username/foo/ as well as all its support files:
$ ./configure --prefix=/home/username/foo && make && make install
It will create the following subdirectories and running that custom Vim will never source files from anywhere outside of /home/username/:
/home/username/foo/bin/
/home/username/foo/share/
…
Related
I'm running code using Ubuntu on a WSL. Every time I edit some C files I need to execute a makefile and run an installer to ensure that the changes are reflected in the python package that I am using. The set of commands I need to execute is
make clean
make
cd python
python setup.py install --user
This works perfectly when I execute them in the terminal. In order to make my life easier, I decided to put these commands in a text file Compile.txt to be executed whenever I need to compile the relevant files. I found this question and tried to replicate its solution. However, whenever I type ./Compile.txt into the terminal I get the error
'. Stop. No rule to make target 'clean
gcc -o .o
gcc: fatal error: no input files
compilation terminated.
make: *** [<builtin>: .o] Error 1
./Compile.txt: line 7: cd: $'python\r': No such file or directory
python: can't open file 'setup.py': [Errno 2] No such file or directory
Can anyone explain what I've done wrong? I apologise for any misuse of terminology as I'm still quite new to Linux.
Thanks in advance.
I downloaded this vim config but decided later I wanted to work using vanilla vim (because i'm still not used to it).
So I followed the instructions at the bottom of the README:
How to uninstall
Just do following:
Remove ~/.vim_runtime
Remove any lines that reference .vim_runtime in
your ~/.vimrc
I deleted the hidden vim_runtime directory located in :home/user/ on Ubuntu 16.04, using
rm -rf ~/.vim_runtime/
then realized this was a mistake. I now can't open vim without getting:
Error detected while processing /home/user/.vimrc:
line 3:
E484: Cannot open file /home/user/.vim_runtime/vimrcs/basic.vim
line 4:
E484: Cannot open file /home/user/.vim_runtime/vimrcs/filetypes.vim
line 5:
E484: Cannot open file /home/user/.vim_runtime/vimrcs/plugins_config.vim
line 6:
E484: Cannot open file /home/user/.vim_runtime/vimrcs/extended.vim
Press ENTER or type command to continue
I don't know what to do from here, It would be great if I could just purge it all and have vim as it was when you first install the OS, I've tried:
sudo apt-get purge vim && sudo apt-get install vim
but still get the same error detection when opening vim after the command has completed.
If you had no personal configuration other than that Vim distribution, just rm /home/user/.vimrc and start anew. You can also remove /home/user/.vim/ if it exists. That gives you a clean slate. There's no need to reinstall Vim; that distribution presumably was just user configuration (i.e. you didn't need sudo to install it), whereas Vim is installed system-wide (via apt). If there's something inside .vimrc that you want to save (and you have no other editor installed), you can launch Vim with vim -N -u NONE.
soapbox
Vim "distributions" like spf-13 and Janus lure you with a quick install and out-of-the-box settings, but you pay the price with increased complexity (you need to understand both Vim's runtime loading scheme and the arbitrary conventions of the distribution) and inflexibility (the distribution may make some things easier, but other things very difficult). Vim is incredibly customizable, using someone else's customization makes no sense.
new config
I would base your personal configuration on the example that ships with Vim. You can install it like this:
$ vim
:edit $VIMRUNTIME/vimrc_example
:saveas $MYVIMRC
:quit
Also see :help defaults.vim.
I'm running into odd behavior with the Interactive-Haskell repl in emacs. When I source a file, the emacs mini buffer shows a series of interactive prompts:
Start a new project named 'myproject'?
Cabal dir (guessed from myproject.cabal):
Build target (empty for default):
Set current directory:
If I leave either the cabal directory or the current directory to the default value of the project directory, the repl is unresponsive. I get a lambda prompt in the interactive Haskell window, I can type, but when I press enter, it never evaluates. The cursor stays on the same line as if I did not press enter at all.
If I change both of those directories to some path other than my project directory, then the repl behaves normally and evaluates expressions as expected.
This is a known bug. and a good catch!
The pull request https://github.com/haskell/haskell-mode/pull/1116/files solves it.
I am trying to make the CoqIDE Vim plugin work on Windows 8.1. When I source the plugin from Vim, I get this error message:
coqtop.opt: command not found.
So I looked up the plugin documentation, and found the part that seems relevent:
"coqtop" should be accessible on PATH. If "coqtop" is not in your PATH, add 'let CoqIDE_coqtop = "/path/to/coqtop"' in your "~/.vimrc".
I'm not sure what this means, but I'm guessing that there is some file or directory named coqtop that must be made visible to vim. So I opened my Coq installation directory and searched for coqtop. The search hits are:
coqtop
coqtop.cmi
coqtop.1
coqtop.byte.1
coqtop.opt.1
The obvious first candidate here is coqtop. When I click it, it opens an interactive Coq console. But when I use the let CoqIDE_coqtop command to link this file to Vim and load the plugin again, I get:
C:Program Files (x86)Coq^Hincoqtop.exe: command not found.
Another thing that looks problematic is the file type. As you can see from the error message above, the coqtop file has an .exe extension, which is specific to MS-DOS and Windows. But I don't think the plugin was written to work with .exe files...
I also tried using all the other search hits as coqtop, to no avail.
Does this mean that the plugin is useless on Windows? If someone can confirm that I'll just give up and use other IDEs. But if possible I'd really, really like to keep using Vim.
I had an unrelated problem with vim a while back, that I thought deleting all vim files would help. It did not, but now I have a new problem. Whenever I try to put syntax on, it says:
Error detected while processing /home/jonah/.vimrc:
line 16:
E484: Can't open file /usr/share/vim/syntax/syntax.vim
I've tried reinstalling fully, but it doesn't fix the issue.
You still have a broken Vim installation with missing runtime files. The file $VIMRUNTIME/syntax/syntax.vim needs to be there. You should never modify / remove system runtime files in /usr/share/vim yourself! Use your distribution's package manager (you didn't tell which Linux disto you're using) to completely reinstall Vim, and ensure that the file is there.