mirror of
https://salsa.debian.org/debian/debian-reference.git
synced 2026-01-16 23:14:19 +00:00
Ch09: rephrase and reorder
Signed-off-by: Osamu Aoki <osamu@debian.org>
This commit is contained in:
parent
ba0c3bd0ba
commit
cf0f0133dd
1 changed files with 11 additions and 9 deletions
|
|
@ -326,6 +326,7 @@ xnoremap * y/\V<C-R>"<CR>
|
|||
xnoremap # y?\V<C-R>"<CR>
|
||||
""" repeat last substitute and *KEEP* flags
|
||||
nnoremap & :&&<CR></screen>
|
||||
<para>In order for the above keybindings to function properly, the terminal program needs to be configured to generate "ASCII DEL" for <literal>Backspace</literal>-key and "Escape sequence" for <literal>Delete</literal>-key.</para>
|
||||
<para>Other miscellaneous configuration can be changed in user's vimrc file. E.g.:</para>
|
||||
<!--
|
||||
I excluded ripgrep for :grep since this is non-essential
|
||||
|
|
@ -363,9 +364,17 @@ augroup END</screen>
|
|||
</section>
|
||||
<section id="_customizing_vim_with_external_packages">
|
||||
<title>Customizing vim with external packages</title>
|
||||
<para>Simple customization to enable secure-modelines and classical IDE can be enabled by installing <ulink url="https://packages.debian.org/unstable/vim-scripts">vim-scripts</ulink> package and appending the following to user's vimrc file.</para>
|
||||
<para>Interesting external plugin packages can be found:</para>
|
||||
<itemizedlist>
|
||||
<listitem> <para> <ulink url="https://www.vim.org/"> Vim - the ubiquitous text editor </ulink> -- The official upstream site of Vim and vim scripts </para> </listitem>
|
||||
<listitem> <para> <ulink url="https://vimawesome.com/"> VimAwsome </ulink> -- The listing of Vim plugins </para> </listitem>
|
||||
<listitem> <para> <ulink url="https://packages.debian.org/unstable/vim-scripts">vim-scripts</ulink> -- Debian package: a collection of vim scripts </para> </listitem>
|
||||
</itemizedlist>
|
||||
<para>Plugin packages in the <ulink url="https://packages.debian.org/unstable/vim-scripts">vim-scripts</ulink> package can be enabled using user's vimrc file. E.g.:</para>
|
||||
<!--
|
||||
I admit I don't use these now. But I need to keep these as an example.
|
||||
I know "set pastetoggle" is out of place but I wanted "leader" here.
|
||||
I don't want to discuss disabled secure-modeline feature in Debian's Vim package.
|
||||
-->
|
||||
<screen>packadd! secure-modelines
|
||||
packadd! winmanager
|
||||
|
|
@ -374,8 +383,7 @@ let mapleader = ' '
|
|||
set pastetoggle=<leader>p
|
||||
" IDE-like UI for files and buffers with <space>w
|
||||
nnoremap <leader>w :WMToggle<CR></screen>
|
||||
<para>In order for the above keybindings to function properly, the terminal program needs to be configured to generate "ASCII DEL" for <literal>Backspace</literal>-key and "Escape sequence" for <literal>Delete</literal>-key.</para>
|
||||
<para>The new native Vim package system works nicely with "<literal>git</literal>" and "<literal>git submodule</literal>". One such example configuration can be found at <ulink url="https://github.com/osamuaoki/dot-vim">my git repository: dot-vim</ulink>. This does essentially:</para>
|
||||
<para>The new native Vim package system works nicely with "<literal>git</literal>" and "<literal>git submodule</literal>". One such example configuration can be found at <ulink url="https://github.com/osamuaoki/dot-vim/tree/old">my git repository: dot-vim</ulink>. This does essentially:</para>
|
||||
<itemizedlist>
|
||||
<listitem> <para>By using "<literal>git</literal>" and "<literal>git submodule</literal>", latest external packages, such as "<literal><emphasis>name</emphasis></literal>", are placed into <literal>~/.vim/pack/*/opt/<emphasis>name</emphasis></literal> and similar.</para> </listitem>
|
||||
<listitem> <para>By adding <literal>:packadd! <emphasis>name</emphasis></literal> line to user's vimrc file, these packages are placed on <literal>runtimepath</literal>.</para> </listitem>
|
||||
|
|
@ -383,12 +391,6 @@ nnoremap <leader>w :WMToggle<CR></screen>
|
|||
<listitem> <para>At the end of its initialization, tags for the installed documents are updated with "<literal>helptags ALL</literal>".</para> </listitem>
|
||||
</itemizedlist>
|
||||
<para>For more, please start <literal>vim</literal> with "<literal>vim --startuptime vimstart.log</literal>" to check actual execution sequence and time spent for each step.</para>
|
||||
<para>Interesting external plugin packages can be found:</para>
|
||||
<itemizedlist>
|
||||
<listitem> <para> <ulink url="https://www.vim.org/"> Vim - the ubiquitous text editor </ulink> -- The official upstream site of Vim and vim scripts </para> </listitem>
|
||||
<listitem> <para> <ulink url="https://vimawesome.com/"> VimAwsome </ulink> -- The listing of Vim plugins </para> </listitem>
|
||||
<listitem> <para> <ulink url="https://packages.debian.org/unstable/vim-scripts">vim-scripts</ulink> -- Debian package: a collection of vim scripts </para> </listitem>
|
||||
</itemizedlist>
|
||||
<para>It is quite confusing to see too many ways<footnote><para> <ulink url="https://packages.debian.org/unstable/vim-pathogen">vim-pathogen</ulink> was popular. </para></footnote> to manage and load these external packages to <literal>vim</literal>. Checking the original information is the best cure.</para>
|
||||
<table>
|
||||
<title>Information on the initialization of <literal>vim</literal></title>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue