VIM ubuntu 系统范围的插件目录

发布于 2024-12-07 17:52:58 字数 197 浏览 0 评论 0原文

ubuntu中的vim插件目录在哪里?我需要删除 autoclose.vim 插件来解决此处描述的问题: 箭头键键入大写字母而不是移动光标

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 instead of moving the cursor

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

公布 2024-12-14 17:52:58

检查 :h 运行时路径 以获取可能位置的完整描述
您的文件夹(考虑到您没有使用捆绑插件)。以下是摘录:

                                *'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).

        ...

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).

        ...
最丧也最甜 2024-12-14 17:52:58

我认为获取所有已安装脚本的列表更容易,而不是阅读 'runtimepath' 上的规则:

:scriptnames

这将显示 vim 已加载的每个脚本的完整路径。如果只有几个,那么您可以找到您正在寻找的那个(OP的autoclose.vim)。

如果列表很长,那么您可以捕获 a 寄存器(或任何其他寄存器)中 scriptnames 的输出,将其粘贴到空缓冲区中,然后搜索名称你的插件的:

:redir @a
:scriptnames
:redir END
:new
:put a
:/autoclose\.vim

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
薯片软お妹 2024-12-14 17:52:58

你应该关注埃里克的评论。

也就是说,我的 .vimrc 中有这些行:

--EDIT--

我知道这个答案不是所选的答案,但由于 ZyX 评论,我学到了一些东西,所以这里是一个编辑。

下面的行应该写成如下:

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>

恐怕很多人都犯了与我完全相同的错误:原始转义代码解决方案就像网络上的任何地方一样,从 Vim wiki 到 SO via很多论坛。

--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>

并且不需要删除任何插件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文