macvim

Vim powerline (Lokaltog's) weird characters in MacVim

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to use Powerline plugin ( https://github.com/Lokaltog/vim-powerline ) for the first time. Plugin seems to be installed. I use vundle with the following command: Bundle 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim'} I've tried many different settings, but currently in my vimrc it looks like this: set guifont=Menlo\ Regular\ for\ Powerline:h15 "set guifont=Monaco\ Regular:h15 " set rtp+=~/.vim/bundle/powerline/powerline/bindings/vim let g:Powerline_symbols = 'fancy' "let g:Powerline_symbols = 'compatible' "let g:Powerline

“dyld: Library not loaded”, “libruby.1.9.1.dylib” when calling “mvim .” in the command line

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to open my rails project into mvim (macvim) using "mvim ." but I get the following error. I recently removed RVM ("rvm implode" which included ruby 1.9.3-p125) and reinstalled 1.9.3-p194. What do I need to do to fix this? Thank you 回答1: brew will compile MacVim against your currently active ruby which was probably 1.9.3-p125. rvm use 1.9.3-p194 --default && brew uninstall macvim && brew install macvim is probably your best bet to fix your problem. 文章来源: “dyld: Library not loaded”, “libruby.1.9.1.dylib” when calling “mvim .” in the

MAC系统打造基于VIM的IDE

匿名 (未验证) 提交于 2019-12-02 22:56:40
1 背景 2 将VIM打造成IDE 2.1 CTags插件 2.2 CScope插件 2.3 nerdtree插件 2.4 YouCompleteMe插件 a. vim一定要是最新版,mac系统自带的vim可能有问题,可以通过brew来安装一个最新的macvim。 b. vim必须要支持python脚本,打开vim,在命令模式下输入 echo has('python') || has('python3'),如果输出1,则可以继续往下了。 c. 系统要安装cmake,如果没有cmake,用brew安装。 d . 系统要安装python-dev,mac默认已经带了这个。 http://releases.llvm.org/download.html 。选择最新版的CLang For macOS。 cmake -G "<generator>" -DPATH_TO_LLVM_ROOT=~/ycm_temp/clang-llvm . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp cmake --build . --target ycm_core --config Release " #####YouCompleteMe Configure let g:ycm_server_python_interpreter='/usr/bin/python

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

旧街凉风 提交于 2019-12-02 22:04:19
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. 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 of where in the file it is. This can make it easier to write macros that do some work and then scroll back

How to break a line in vim in normal mode?

依然范特西╮ 提交于 2019-12-02 18:50:02
I would like to break a line (at the location of the cursor) in to two lines without leaving normal mode (entering insert or command-line mode). Is this possible? I currently get to the location I want and hit 'i' to enter insert mode, 'enter' to break the line in two, then 'esc' to return to normal mode. I am not trying to set a maximum line length or do any syntax or anything like that. I just want to break one line into two lines without leaving normal mode. 'J' joins the line the cursor is on to the line below it, which is handy. I want the opposite -- to break one line into two with a

Making (Mac)Vim reopen with files open when closed

人盡茶涼 提交于 2019-12-02 17:21:25
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! RestoreSession() if argc() == 0 "vim called without arguments execute 'source ~/.vim/Session.vim' end

Persistent :set syntax for a given filetype?

我的未来我决定 提交于 2019-12-02 15:00:28
I'm working on a Symfony2 project which uses Twig, and the filetypes are myfile.html.twig . Vim doesn't automatically detect the syntax highlighting and so applies none. I can use :set syntax=HTML after I've opened the file but this is a pain when jumping between files. Is there a way to persistently set the syntax highlighting for a specific file type in vim? You can use autocmd to accomplish that, i.e.: augroup twig_ft au! autocmd BufNewFile,BufRead *.html.twig set syntax=html augroup END Should work. Muhammad Reda Add one of the following passages to your .vimrc : " Set the filetype based

Vim auto complete

浪尽此生 提交于 2019-12-02 14:54:58
So I know you can get Vim autocompletion with Ctrl - X , Ctrl - O but I'm wondering if you could rework it so it works with just pressing Tab (more like Textmate's snippets), or even just how I could remap it to something a bit shorter (even if I can't get fancy tab completion), as I find Ctrl - X , Ctrl - O a bit awkward. c00kiemon5ter Map Tab to Ctrl - X , Ctrl - O :imap <tab> <c-x><c-o> See this page from vim-wiki for a smarter Tab completion I realize this question has been already answered, but you might be interested in a plugin such as SuperTab , which provides auto-completion and uses

How to jump to a specific character in vim?

ぃ、小莉子 提交于 2019-12-02 13:57:11
How can I jump to the next character X in vim? I frequently use, e.g., dt: or ct: to delete/change everything up until a colon (or some other character). Is there any short key combo to simply move my cursor position to that character? You can type f<character> to put the cursor on the next character and F<character> for the previous one. t and f work without a command as well, so to move to colon use f: and to move to right before colon use t: Alexander Corwin If you do a search for that character with / , you can then hit n to move to the next occurrence of it. Maybe you are just searching

What are the most-used vim commands/keypresses?

醉酒当歌 提交于 2019-12-02 13:46:09
I'm a Ruby programming trying to switch from Textmate to MacVim, and I'm having trouble wading through the gargantuan lists of things you can do in VIM and all of the keypresses for them. I'm tired of hearing "You can use 'I' for inserting text, or 'a' for appending text after the character, or 'A' for appending text at the end of the line, or…" I can't imagine everyone uses all 20 different keypresses to navigate text, 10 or so keys to start adding text, and 18 ways to visually select an inner block. Or do you!? My ideal cheat sheet would be the 30-40 most-used keypresses or commands that