Reputation: 5851
I recently got a mac. I was previously working on a laptop with ubuntu and I was using vim.
I now will discuss about vim in console (iTerm2 or the default terminal) and macvim.
The problem is that some binding don't work under mac. For example I had CTRL left/right for navigating between splits, CTRL up/down to move lines or blocks of code up and down, etc. They don't work anymore.
I had a bunch of plugins (nerdtree, powerline, etc.) that now look weird. Powerline doesn't display special characters in macvim and in terminal they are question marks.
In console, nerdtree looks weird and it doesn't display the special triangle character. If I hit return to open a file selected from nerdtree, it doesn't do anything. In macvim, it works ok.
Is there any guide on how to use vim on mac? Or what is the recommended way?
Upvotes: 2
Views: 1172
Reputation: 196886
I have the exact same config on my Mac and a Windows box at work, my Ubuntu box at home and a couple of VPSes. It works exactly the same on every platform in GVim/MacVim or in plain Vim.
Unfortunately I don't use either NERDTree nor Powerline but Vdt's answer seems to have all the info needed.
Some of the behaviors you describe are custom mappings. You should show us your ~/.vimrc
(the old one on linux and the new one on the Mac, if there are differences) so that we can help you make it more portable.
Also, "looks weird" means nothing: please add a screenshot or two.
Upvotes: 0
Reputation: 9244
Nerdtree : let g:NERDTreeDirArrows=0
Powerline : Take a look at the part of strange characters
in the document https://github.com/Lokaltog/vim-powerline
Navigating within splits with Ctrl + arrows
work on mine. Can you post your vimrc, or try running vim without any configuration.
Ctrl+arrows
to move lines and block doesn't work on mine.
Upvotes: 3
Reputation: 13444
Did you check which key was sent by your terminal to vim ? Did you tried to set it manually ? I had similar problems with emacs, including one keybinding I'm still not able to reproduce :(
Upvotes: 0