macvim

How do I get NERDCommenter to add comments in a particular column?

我只是一个虾纸丫 提交于 2019-12-04 00:57:35
问题 NERDCommenter works like this by default: //level1 //level2 //level3 How do I get to work like this? //level1 // level2 // level3 回答1: From the documentation: [count]<leader>cl [count]<leader>cb |NERDComAlignedComment| Same as |NERDComComment| except that the delimiters are aligned down the left side (cl) or both sides (cb). 回答2: It is possible to change the default behaviour of ToggleComment ( <leader>c<space> ) to use left alignment. However this means changing two lines in $vimfiles/bundle

Windows下vim方式操作软件+Gvim使用

对着背影说爱祢 提交于 2019-12-03 22:43:55
Vim+ Total Command http://sourceforge.net/p/viatc/home im key At Total Commander 也许你和我一样,使用着两大神器, Vim 和 Total Commander Vim的模式与快捷键让人着迷,TC的高效和强大,让人欢喜。 于是,我尝试将Vim与TC结合,让TC在操作上,变更加快捷起来。 让TC带有Vim的模式 ,h,j,k,l移动和更多; 按下:到命令行模式;按下i到编辑模式。 不需要使用时,Alt+Esc禁用功能,或者干脆退出ViATc, 对TC完全无影响 。 任意一个快捷键都不与TC自带的快捷键冲突,绿色。 你可以常驻为 任务栏图标 ,双击任务栏图标,或者 Win+E调用TC 。 做为一个 TC插件 安装,方便快捷。 多次移动、组合键、永久 保存/恢复选择列表、还有更多…… Vim Mode At Total Commander 简介 也许你和我一样,使用着两大利器,Vim与TotalCommander。 Vim的模式与快捷键让人着迷,TC的高效和强大,让人欢喜。 于是,我尝试将Vim模式与TC结合,让TC操作“快捷”起来。 如果你曾经使用过Vim,又正在使用TC,那么你会喜欢ViATc 如果你在使用TC,但又觉得鼠标的点击不足以更快速地操作,那么你会想用ViATc 把复杂的操作

Trouble with vimrc file recognition with MacVim

廉价感情. 提交于 2019-12-03 22:19:56
I'm having difficulty getting MacVim (7.3-64) to recognize my .vimrc and .gvimrc files since upgrading to OS X 10.7.3. Previous, I've simply symlinked my .vimrc and .gvimrc using these commmands: $ ln -s ~/.vim/vimrc /usr/local/Cellar/macvim/7.3-57/MacVim.app/Contents/Resources/vim/.vimrc $ ln -s ~/.vim/gvimrc /usr/local/Cellar/macvim/7.3-57/MacVim.app/Contents/Resources/vim/.gvimrc However, when I currently symlink my rc files, I can not get MacVim to recognize them. I've installed MacVim via Homebrew. Does anyone have any suggests as to what the problem could be? The ~/.vim/ folder (for

Can't paste into MacVim

安稳与你 提交于 2019-12-03 12:24:32
I copy text from outside of Vim. ⌘V in other apps pastes text without problem. In MacVim, it doesn't work. In Insert Mode, nothing appears. In Normal Mode, I get E353: Nothing in register + . This happens when set clipboard=unnamed is on or off. Oddly enough, this was working before. What's wrong? If you are using tmux and sometimes you initially launch MacVim via the mvim command-line program, then you might be encountering the problem that prompted me to write the reattach-to-user-namespace command . My guess is that clipboard access worked on prior occasions because you happened to have

Is it possible to not display a ~ for blank lines in Vim?

[亡魂溺海] 提交于 2019-12-03 09:11:01
问题 Is it possible to not display a ~ for blank lines in Vim? This confuses Mac Vim's scrollbar, and I quite don't like these tildes. 回答1: As jamessan said, you can’t disable them. The scrolling behavior isn’t specific to MacVim, either — it works the same way in the terminal and in gvim: Instead of seeing this as a problem, what you should do is learn to see this as part of Vim’s flexibility. For example, you can use the zt command to scroll the current line to the top of the screen, regardless

VIM Color scheme not loading by default

懵懂的女人 提交于 2019-12-03 08:08:41
问题 When I do :colorscheme vilight it loads the color scheme fine. So I added colorscheme vilight to my .vimrc but its not loading it on start. Am I missing something? Also in my config set background=dark syntax on colorscheme vilight set lines=60 columns=200 回答1: Are you using gvim? It is possible that your .gvimrc or the system's gvimrc file is overriding the colorscheme selection from your .vimrc. 回答2: Sometimes it helps to put the colorscheme at the end of the _gvimrc .gvimrc file which is

How to not get special characters in place of meta key combinations for VIM on OS X

时光怂恿深爱的人放手 提交于 2019-12-03 06:45:30
On OS X, at any program, when I type option-p I get π , option-P I get ∏ and there's a bunch of alt / option bindings that just return greek and other special characters. Is there a way to disable that? Currently I'm using the Auto Pairs VIM plugin and it has the following default mappings: <M-p> : Toggle Autopairs (g:AutoPairsShortcutToggle) <M-e> : Fast Wrap (g:AutoPairsShortcutFastWrap) <M-n> : Jump to next closed pair (g:AutoPairsShortcutJump) <M-b> : BackInsert (g:AutoPairsShortcutBackInsert) It seems I can't use these and other meta key based VIM mappings while this special input is

Command key in MacVim

て烟熏妆下的殇ゞ 提交于 2019-12-03 06:09:16
How do I use the command key in MacVim? For example I would like to be able to press Cmd t to open CtrlP or Cmd n to open NerdTree. Conner See :help <D- . Use <D-t> to map to ⌘-T ; however , ⌘-T is already mapped to "New Tab" within MacVim's menu. You'll have to remove that to be able to use it in a Vim map. Some keys are OS-bound and you just can't access them, but ⌘-T can be made available and is actually the example they use in the help file (see :help Actions.plist and scroll up a few lines to 4. ). You'll need to unset the "New Tab" binding with :macmenu File.New\ Tab key=<nop> and then

Making (Mac)Vim reopen with files open when closed

岁酱吖の 提交于 2019-12-03 03:58:43
问题 Use case: You have 2-3 files displayed in your MacVim window(s). You press ctrl+Q and MacVim closes. When you restart MacVim it opens displaying the same files you had when you closed it. How can you do that? -- ANSWER I added the following to my .vmirc "save and close all files and save global session nnoremap <leader>q :mksession! ~/.vim/Session.vim<CR>:wqa<CR> "close all files without saving and save global session nnoremap <leader>www :mksession! ~/.vim/Session.vim<CR>:qa!<CR> function!

vim ruby mismatch on Mac High Sierra

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I recently upgraded my Mac to High Sierra After the upgrade, Macvim (mvim) stopped working because (I assume) HighSierra upgraded ruby to 2.3, and mvim is using ruby 2.0. Following is the error I am getting dyld: Library not loaded: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib Referenced from: /usr/local/Cellar/macvim/8.0-134/MacVim.app/Contents/bin/../MacOS/Vim Do I need to compile vim again or is there any way to fix this problem? Thanks in advance. 回答1: This worked for me. YMMV brew uninstall --purge