vim

MacVim in Yosemite can't fullscreen

荒凉一梦 提交于 2019-12-21 09:05:20
问题 I'm using Mac Yosemite 10.10.2 and newest macvim, but when I use fullscreen mode, the lines at the top of screen will be black, and if I move my mouse there, it will show the system line. . I want to get my fullscreen back. 回答1: This is a known issue, happened me. A couple of work a rounds are: Uncheck "Prefer native full-screen support" in preferences. Open a second tab. This repositions the text and view correctly. There is also a .diff patch on https://code.google.com/p/macvim/issues

How do I get vim to autocomplete my jQuery code?

时光怂恿深爱的人放手 提交于 2019-12-21 07:36:32
问题 I'm using vim to write my jQuery code. Is there a plugin that I can use to autocomplete parts of the code? Edit i found this Snippet for jquery javascript-jquery Snippet 回答1: Javascript is supported as part of vim's omni-completion languages. You can activate this completion via Ctrl-x + Ctrl-o when working inside a javascript buffer. For more info, type :help new-omni-completion in the status bar. I don't know of a plugin that specifically handles jQuery, but there are a few that trigger

Can Vim display two spaces for indentation, while keeping four spaces in the file?

爷,独闯天下 提交于 2019-12-21 07:33:18
问题 I want to work on someone else's project, and he uses 4 spaces for indentation. I use 2, and my screen is not big enough to edit using 4 spaces comfortably. Can I configure Vim to display 2 spaces for indentation, but write 4 to the file? 回答1: This is the opposite of what was asked here. Yes, you can! If you have the "conceal" option, you can try this out. :syntax match spaces / / conceal cchar= "Don't forget the space after cchar! :set concealcursor=nvi :set conceallevel=1 Here are what

Recover a vim file from the .un~ file without the undo command

南笙酒味 提交于 2019-12-21 07:30:34
问题 How can I restore a vim file from the undo file without hitting undo ? I had a vim file that I saved while adding text. Then I ran a python command that emptied the file's contents, and I can see some of the words the file contained in the file's .un~ file. When I try to undo in the file, it says Already at latest change . I can't find the swap file in my swap files directory. 回答1: You can't. The undo information is linked to Vim's last knowledge of the file's contents; when they don't

Recover a vim file from the .un~ file without the undo command

你说的曾经没有我的故事 提交于 2019-12-21 07:30:32
问题 How can I restore a vim file from the undo file without hitting undo ? I had a vim file that I saved while adding text. Then I ran a python command that emptied the file's contents, and I can see some of the words the file contained in the file's .un~ file. When I try to undo in the file, it says Already at latest change . I can't find the swap file in my swap files directory. 回答1: You can't. The undo information is linked to Vim's last knowledge of the file's contents; when they don't

Razor .cshtml syntax highlighting for vim?

梦想与她 提交于 2019-12-21 07:24:09
问题 I'm looking for a .cshtml vim syntax file. Are there any projects that haven't made it to www.vim.org? 回答1: ":setf html" solves the 80% part :) 回答2: this guy has razor support planned, but is not yet there. However, it does add some features to the existing c# support. https://github.com/OrangeT/vim-csharp 回答3: You can find nice vim-razor plugin in https://github.com/adamclerk/vim-razor $ cd ~/.vim/bundle $ git clone https://github.com/adamclerk/vim-razor 回答4: Settled with adding this to

Progressively slower reloading time of .vimrc

99封情书 提交于 2019-12-21 07:16:01
问题 My boot time for vim is about a half second (tested with "--startuptime"), but after I reload vimrc a couple times via source , it gets slower subsequently. I have not debugged .vimrc in a systematic way, so I am not sure how to proceed. Setting verbose helps to kind of see what is going on and I am almost certain that the .vimrc is being loaded more than once. (especially filetype.vim and ftplugin.vim ) Whenever I press Ctrl-C to stop the hang, I get an error in filetype.vim , which I think

Vim - helptags not working for NERDtree

孤街浪徒 提交于 2019-12-21 07:15:10
问题 I downloaded and manually installed NERDTree from http://www.vim.org/scripts/script.php?script_id=1658 @hits ➜ .vim rvm:(-ruby-1.9.2) ls -laR .: total 28 drwxr-xr-x 6 hitsu hitsu 4096 2012-02-16 15:21 . drwxr-xr-x 49 hitsu hitsu 4096 2012-02-27 17:43 .. drwxrwxr-x 2 hitsu hitsu 4096 2011-12-28 14:18 doc drwxrwxr-x 2 hitsu hitsu 4096 2011-12-28 14:17 nerdtree_plugin -rw-rw-r-- 1 hitsu hitsu 283 2012-02-07 11:05 .netrwhist drwxrwxr-x 2 hitsu hitsu 4096 2011-12-28 14:17 plugin drwxrwxr-x 2 hitsu

Vim enters into visual mode on selecting text after El Capitan update

喜夏-厌秋 提交于 2019-12-21 07:12:30
问题 Issue is what the title says. Earlier I used to copy text from text files open in vim simply by selecting text and doing Ctrl + C . But now it puts me into visual mode, thus not allowing to copy the text. Its really annoying. Anybody knows any fix for this. Thanks. 回答1: You probably have the mouse mode active. You can turn it off with: :set mouse= And turn it back on with :set mouse=a If you are using iTerm, you can leave mouse mode on all the time if you want, and hold Option when you want

How to delete, including the current character?

99封情书 提交于 2019-12-21 07:05:13
问题 Let's say I've typed "abcdefg", with the cursor at the end. I want to delete back to the c, so that I only have "abc" left. Is there a command like d that includes the current character? I know I could do dTcx , but the x feels like a work-around and I suppose there's a better solution. 回答1: No. Backward motions always start on the left of the current character for c , y and d which is somehow logical but also unnerving. The only "clean" solutions I could think of either imply moving to the