where is the vim plugin directory in ubuntu. I need to remove the autoclose.vim plugin to fix problem described here: Arrow keys type capital letters in开发者_如何学运维stead of moving the cursor
Check :h runtimepath
for a complete description of possible locations for
your folder (considering you're not using a bundle plugin). Here is an excerpt:
*'runtimepath'* *'rtp'* *vimfiles*
'runtimepath' 'rtp' string (default:
Unix, Mac OS X: "$HOME/.vim,
$VIM/vimfiles,
$VIMRUNTIME,
$VIM/vimfiles/after,
$HOME/.vim/after"
...
global
{not in Vi}
This is a list of directories which will be searched for runtime
files:
filetype.vim filetypes by file name |new-filetype|
scripts.vim filetypes by file contents |new-filetype-scripts|
autoload/ automatically loaded scripts |autoload-functions|
colors/ color scheme files |:colorscheme|
compiler/ compiler files |:compiler|
doc/ documentation |write-local-help|
ftplugin/ filetype plugins |write-filetype-plugin|
indent/ indent scripts |indent-expression|
keymap/ key mapping files |mbyte-keymap|
lang/ menu translations |:menutrans|
menu.vim GUI menus |menu.vim|
plugin/ plugin scripts |write-plugin|
print/ files for printing |postscript-print-encoding|
spell/ spell checking files |spell|
syntax/ syntax files |mysyntaxfile|
tutor/ files for vimtutor |tutor|
And any other file searched for with the |:runtime| command.
The defaults for most systems are setup to search five locations:
1. In your home directory, for your personal preferences.
2. In a system-wide Vim directory, for preferences from the system
administrator.
3. In $VIMRUNTIME, for files distributed with Vim.
*after-directory*
4. In the "after" directory in the system-wide Vim directory. This is
for the system administrator to overrule or add to the distributed
defaults (rarely needed)
5. In the "after" directory in your home directory. This is for
personal preferences to overrule or add to the distributed defaults
or system-wide settings (rarely needed).
...
Instead of reading the rules on 'runtimepath'
, I think it is easier to get a list of all the installed scripts:
:scriptnames
This will show the complete path to each script that vim has loaded. If there are only a few, then you can spot the one you are looking for (autoclose.vim
for the OP).
If the list is long, then you can capture the output of scriptnames
in the a
register (or any other), paste it into an empty buffer, and search for the name of your plugin:
:redir @a
:scriptnames
:redir END
:new
:put a
:/autoclose\.vim
You should follow Eric'comment.
That said, I have these lines in my .vimrc:
--EDIT--
I know this answer is not the chosen one but I learned something thanks to ZyX comments so here is an edit.
The lines below should be written as follow:
nnoremap <Esc>A <up>
nnoremap <Esc>B <down>
nnoremap <Esc>C <right>
nnoremap <Esc>D <left>
inoremap <Esc>A <up>
inoremap <Esc>B <down>
inoremap <Esc>C <right>
inoremap <Esc>D <left>
I'm afraid a lot of people do the exact same mistake I did: the raw escape code solution is like everywhere on the net from the Vim wiki to SO via lots of forums.
--END EDIT--
nnoremap <type ctrl+v then Esc to obtain a single char that looks like ^[>A <up>
nnoremap <type ctrl+v then Esc to obtain a single char that looks like ^[>B <down>
nnoremap <type ctrl+v then Esc to obtain a single char that looks like ^[>C <right>
nnoremap <type ctrl+v then Esc to obtain a single char that looks like ^[>D <left>
inoremap <type ctrl+v then Esc to obtain a single char that looks like ^[>A <up>
inoremap <type ctrl+v then Esc to obtain a single char that looks like ^[>B <down>
inoremap <type ctrl+v then Esc to obtain a single char that looks like ^[>C <right>
inoremap <type ctrl+v then Esc to obtain a single char that looks like ^[>D <left>
and didn't need to remove any plugin.
精彩评论