diff options
author | Silvino Silva <silvino@bk.ru> | 2019-03-04 16:46:25 +0000 |
---|---|---|
committer | Silvino Silva <silvino@bk.ru> | 2019-03-04 16:46:25 +0000 |
commit | e0a5c6deb7ca4845763083ae7b4f6901e36deefc (patch) | |
tree | baf772a443f48c3dfa6e7c88adc4f68cd82b1e4b /tools/vim.html | |
parent | fed632cea589a4fc730dc852538cb40ca6f559fa (diff) | |
parent | 947ffc14fd8f0987d094210659bbacc38c1637f5 (diff) | |
download | doc-e0a5c6deb7ca4845763083ae7b4f6901e36deefc.tar.gz |
release 0.4.3
Diffstat (limited to 'tools/vim.html')
-rw-r--r-- | tools/vim.html | 97 |
1 files changed, 89 insertions, 8 deletions
diff --git a/tools/vim.html b/tools/vim.html index b3354d8..dd1e8a6 100644 --- a/tools/vim.html +++ b/tools/vim.html @@ -2,12 +2,12 @@ <html dir="ltr" lang="en"> <head> <meta charset='utf-8'> - <title> Vim</title> + <title>Vim</title> </head> <body> - <a href="index.html">Systools Index</a> - <h1 id="vim"> Vim</h1> + <a href="index.html">Tools Index</a> + <h1 id="vim">Vim</h1> <p><leader> with default configuration is key \, so when you see <leader>-W means pressing \W</p> @@ -29,7 +29,7 @@ personalizing it;</p> <pre> - $ sudo cp ~/sysdoc/conf/etc/skel/.vimrc /etc/skel/ + $ sudo cp ~/doc/conf/etc/skel/.vimrc /etc/skel/ $ sudo mkdir /etc/skel/.vim $ sudo mkdir /etc/skel/.vim/swap $ sudo mkdir /etc/skel/.vim/views @@ -44,7 +44,7 @@ <p>Default vimrc skeleton is configured to use wombat2mod, which is installed by adduser skeleton.</p> - <h2 id="spacetab">3. Split and Tab</h2> + <h2 id="split">3. Split and Tab</h2> <p>Horizontal split;</p> <pre> @@ -85,6 +85,19 @@ <dd>Open vertical split with file browser.</dd> </dl> + <p>To find files, run vim at top level of project and then use find auto completion or *;</p> + + <pre> + :find nameofdirectory + Tab + :find nameofdir* + Tab + </pre> + + <p>For file browsing there is also a option to use edit;</p> + + <pre> + :edit nameofdirectory/ + <pre> + <h2 id="edit">5. Editing files</h2> <p>Come from background;</p> @@ -179,13 +192,81 @@ comma (,), press esc to confirm.</dd> </dl> - <h2 id="spellcheck">6. Spell check</h2> + <h2 id="ctags">6. Tags</h2> + + <p>Tags, at top level of project;</p> + + <pre> + $ ctags -R . + $ vim src/hello_world.c + </pre> + + <p>To follow a tag;</p> + + <pre> + Ctrl-] + </pre> + + <p>To get back;</p> + + <pre> + Ctrl-t + </pre> + + <p>Autocomplete, press to see all options;</p> + + <pre> + Ctrl-n + </pre> + + <p>To move forward and backward in options;</p> + + <pre> + Ctrl-n Ctrl-p + </pre> + + <p>Show auto completion with references to only this file;</p> + + <pre> + Ctrl-x Ctrl-n + </pre> + + <p>Show auto completion with filenames, * Tab can be used;</p> + + <pre> + Ctrl-x Ctrl-f + </pre> + + <p>Show auto completion with only tags;</p> + + <pre> + Ctrl-x Ctrl-] + </pre> + + <h2 id="spellcheck">7. Spellcheck</h2> <p>Press z= over the bad written word and select desired one.</p> - <h2 id="plugin">7. Plugins</h2> + <h2 id="plugin">8. Plugins</h2> + + <h2 id="vimdiff">9. Vimdiff</h2> + + <p>If two files are open in <a href="#split">split</a> type :diffthis in both windows to get vimdiff of the files. To close type :diffoff.</p> + + <dl> + <dt>do<dt> + <dd> Get changes from other window into the current window.</dd> + <dt>dp</dt> + <dd>Put the changes from current window into the other window.</dd> + <dt>]c</dt> + <dd>Jump to the next change.</dd> + <dt>[c</dt> + <dd>Jump to the previous change.</dd> + <dt>Ctrl W + Ctrl W</dt> + <dd>Switch to the other split window.</dd> + </dl> - <a href="index.html">Systools Index</a> + <a href="index.html">Tools Index</a> <p>This is part of the Hive System Documentation. Copyright (C) 2019 Hive Team. |