Closed dtothefp closed 9 years ago
Have the same iTerm issues. Its iTerm related (and with good reason! cmd is after all standard functional modifier key on mac). I tried to figure out a way to get rid of these issues in iTerm, but couldn't find a solution.. Since I have some other modifications swell, I forked the repo and added some replacement for the (in my regards) most important stuff. Now for example CMD+N opens NERDTree in GUI, but
I don't think that native (non-macvim) vim supports the Cmd key so what you guys are seeing is that the Cmd-based shortcuts simply don't work in terminal vim. This is not a bug, as the YADR configuration is explicitly designed for MacVim and any support for terminal vim is purely a "bonus". I do know there are several people using terminal vim with yadr and there are always work arounds for the cmd shortcuts
A nerdtree tip: use Ctrl-\ to expose current file in nerdtree. This is usually the best way to get it to open up to what you want.
The ". is a directory" is something that started happening recently - probably a nerdtree update. YADR does not really customize nerdtree beyond what you will see here: https://github.com/skwp/dotfiles/blob/master/vim/settings/NERDtree-tabs.vim https://github.com/skwp/dotfiles/blob/master/vim/settings/NERDtree.vim
You can try playing with those settings to see if they affect what you want.
p.s. you can easily add your own shortcuts to ~/.vimrc.after without forking the repo if that helps... https://github.com/skwp/dotfiles/blob/master/doc/vim/override.md
@effi @skwp thanks for your reply. I did find a Stack Overflow on the cmd key in terminal MacVim which is quite extensive http://stackoverflow.com/questions/26310077/use-cmd-mappings-in-console-vim. I guess I'm a little confused if "YADR configuration is explicitly designed for MacVim" (I assume you mean GUI here), why plugins like vim-tmux-navigator are included. I assumed from this the point would be to have a mouseless setup where you can move between VIM and shell prompts using the keyboard? I do prefer using the MacVim GUI but seemless navigation in the terminal is amazing http://stackoverflow.com/questions/26310077/use-cmd-mappings-in-console-vim.
Also, I'm confused why the :NERDTreeToggle is in the MacVim GUI specific settings (i.e. it uses the cmd key), as this is one of the most common commands I would use in either environment.
As far as the ". is a directory" issue is concerned, this is something in my previous setup that seemed to just work out of the box with NERDTree and MacVim, i.e. opening the current directory tree with mvim .
, and feel as if some other config has potentially adversely effected this capability?
@skwp thanks for your link on overrides and I did previously see https://github.com/skwp/dotfiles/blob/master/doc/vim/override.md. I've been meaning to make a ~/.yadr/vim/after/.vimrc.after
file and see how it works. I was a little confused because looking through the VimScripts I didn't see anywhere that the after
file is source
d but maybe I just missed it.
I have traced it back to bogado/file-line. The solution is to comment this out in the vim-improvements.vundle. Then reload vim and type :VundleClean to remove the repository.
Job done
I've recently installed YADR and none of the keymappings utilizing the "command" key in the
yadr-keymap-mac.vim
file (which is essentially all of them) are working. I echo'd the sourced scripts insettings.vim
and verified that theyadr-keymap-mac.vim
file was being sourced. Also, I verified that iTerm is running homebrew installed MacVim. All of the keymaps work fine in the MacVim GUI when run outside of iTerm.Essentially, I think somehow the command key is conflicting with native iTerm and/or OS X hotkeys, although VIM is open in iTerm. If I change the mappings to use keys other than command, they work fine in iTerm.
Also, a couple general VIM/NERDTree related issues:
vim .
to open the current directory tree, VIM would open with NERDTree open. In YADR VIM opens without NERDTree and gives a message. is a directory
C
is used to change the NERDTree root.