diff options
author | Silvino Silva <silvino@bk.ru> | 2019-03-04 16:44:37 +0000 |
---|---|---|
committer | Silvino Silva <silvino@bk.ru> | 2019-03-04 16:44:37 +0000 |
commit | f87cd06b4072c23cfd3313227318ef5259003934 (patch) | |
tree | 0a1849bd169e44b2834270c7996a4e58f60dcb54 /tools/vim.html | |
parent | ae082636f51217bd22a23b3b8f218aff450b81d8 (diff) | |
download | doc-f87cd06b4072c23cfd3313227318ef5259003934.tar.gz |
vim documentation revision
Diffstat (limited to 'tools/vim.html')
-rw-r--r-- | tools/vim.html | 76 |
1 files changed, 70 insertions, 6 deletions
diff --git a/tools/vim.html b/tools/vim.html index 89ac0c0..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">Tools Index</a> - <h1 id="vim"> Vim</h1> + <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 @@ -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,64 @@ comma (,), press esc to confirm.</dd> </dl> - <h2 id="spellcheck">6. Spellcheck</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">8. Vimdiff</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> |