vim

Why can't I source my vimrc after installing vundle?

南笙酒味 提交于 2019-12-30 07:41:05
问题 I'm trying to get my Vim to update on the fly after editing vimrc. So I followed the instructions at Vimcast which basically source vimrc every time you hit save. But that doesn't work for some reason (when I save my vimrc it doesn't give any errors), so I decided to run source $HOME/.vimrc manually and here's what I got: -bash: Configuration file for vim set nocompatible : command not found -bash: Plugin Management { filetype off : command not found -bash: .vimrc: line 7: syntax error near

VIM thesaurus file

限于喜欢 提交于 2019-12-30 06:14:07
问题 I have been poking around for a good solution for a vim thesaurus. The capability is built-in, obviously, but the file everyone seems to use is the mthesaur.txt. While it 'works' in the sense that the commands in insert mode bring up a list, it seems to me the results are programatically correct but not super useful. The vim online thesaurus plugin works very well, but the latency over the wire and necessity of using a split for the returned buffer is less than ideal. Anyone have an opinion

Vim on Cygwin: Warn that vimrc is using windows end of line char

六眼飞鱼酱① 提交于 2019-12-30 06:09:10
问题 I just installed cygwin on my machine and I am just getting everything setup. I created a softlink between .vimrc in my cygwin home dir and my windows home dir but vim is having some difficulties reading the .vimrc file since it is using windows end of line characters. Is there some method that I can use to warn vim that my vimrc file is using windows end of line char? Here is some output. ~ $ ls -la total 43 drwxr-xr-x+ 1 Jake None 0 Mar 30 10:11 . drwxrwxrwt+ 1 Jake root 0 Mar 30 09:33 ..

Saving output of :map in vim

删除回忆录丶 提交于 2019-12-30 05:58:55
问题 Q1: Is there a way of saving the output of the command :map to a file? Q2: In a related question, I have the following map in my vimrc file: map <f1> :wa<cr> When I load a latex file (I have the vim-latex plugin installed), the F1 key now invokes help. Is there a way of changing this without manually having to type the map again? 回答1: A1: To redirect/save the output of :map : :redir >> ~/mymaps.txt :map :redir END A2: As kemp says, you can find it using verbose and modify the plugin file. Or

practicalVim2 笔记

雨燕双飞 提交于 2019-12-30 04:48:33
windows capslock 修改映射为left-Ctrl insert & visual mode setting cursor operator pending insert mode viusual mode command view edit file completion macro file explore config vim-plug windows capslock 修改映射为left-Ctrl Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1D,00,3A,00,00,00,00,00 保存为 .reg 文件 执行即可 insert & visual mode i I a A o O s S c C setting :hls highlight search 高亮搜索结果 配合 / ? 的字符串搜索 :noh no highlight search 搜索结束后取消高亮显示 :set incsearch 增量搜索 边搜索边高亮 :h option-list 查看vim所有设置选项

Compile Vim 7.3 with +clientserver feature on Mac OS X

眉间皱痕 提交于 2019-12-30 03:55:08
问题 How do I compile Vim with the clientserver feature on Mac OS X? I have the vim-7.3.tar.bz2 source I understand that MacVim has this built in, but it only works when the GUI is running . I want to work with a CLI version, as my work is so much easier with the CLI (I can switch to the Terminal with ease, for example). I compiled Vim 7.3 with the following ./configure options ./configure --enable-rubyinterp --enable-pythoninterp --with-features=huge I have looked at this question on Unix & Linux

What's the line setting vim option at the bottom of a text file called?

夙愿已清 提交于 2019-12-30 03:19:09
问题 The line looks like this .. vim: set ft=help norl ts=8 tw=78 et : And appears at the bottom of some text files, such as vim documentation. I just want to know where I can look this topic up in the vim help to read about it. 回答1: It is called a modeline. See :help modeline for more information. Basically, it is a way to tell Vim how to render a text file. 回答2: It’s called a modeline. Try: :help modeline 回答3: That is the modeline. :help modeline 来源: https://stackoverflow.com/questions/4818741

Vim incremental search during substitution

时光怂恿深爱的人放手 提交于 2019-12-30 03:16:09
问题 I am terrible at writing vim regular expressions. Whenever I write one to do a substition, it never works the first time because I inevitably end up writing something Perl instead of vim. I fare a lot better when doing a simple search because I have incsearch turned on and I can see in real-time whether my pattern matches. Is there a way I can have the s command act like / (performing an incremental search) while I am attempting to write a proper pattern? 回答1: I'm not sure but I think there

How to use vim as editor in Matlab GUI

杀马特。学长 韩版系。学妹 提交于 2019-12-30 03:09:12
问题 I am using Matlab R2013b. I am using the GUI, with the Command Windows and Editor in split screen. In the Matlab preferences > Editor/Debugger > Editor. There is an option to set a custom editor instead of the Matlab editor. I set it to my local editor /usr/bin/vim , but then I am not able to open files at all anymore. Is there a possibility to use the vim editor in split screen mode? I am aware of !vim file.m , but this is not the solution I am looking for, as this only works satisfactory in

What's the difference between ':source file' and ':runtime file' in vim?

佐手、 提交于 2019-12-30 03:01:12
问题 I saw this command in the /etc/vimrc file on my system: runtime! vimrc_example.vim From the docs: :ru[ntime][!] {file} .. Read Ex commands from {file} in each directory given by 'runtimepath'. Is it otherwise equivalent to :source {file} ? 回答1: :source sources the file specified by the path given (relative or absolute) :runtime sources the first file (unless banged!) found in &runtimepath that matches the partial path given. BTW, the pathnames used with :runtime can contain wildchars (somehow