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 | |
parent | fed632cea589a4fc730dc852538cb40ca6f559fa (diff) | |
parent | 947ffc14fd8f0987d094210659bbacc38c1637f5 (diff) | |
download | doc-e0a5c6deb7ca4845763083ae7b4f6901e36deefc.tar.gz |
release 0.4.3
Diffstat (limited to 'tools')
-rw-r--r-- | tools/conf/etc/skel/.vimrc | 55 | ||||
-rw-r--r-- | tools/index.html | 11 | ||||
-rw-r--r-- | tools/scripts/pkgmk-test.conf | 2 | ||||
-rw-r--r-- | tools/vim.html | 97 |
4 files changed, 133 insertions, 32 deletions
diff --git a/tools/conf/etc/skel/.vimrc b/tools/conf/etc/skel/.vimrc index 9958538..2a45faf 100644 --- a/tools/conf/etc/skel/.vimrc +++ b/tools/conf/etc/skel/.vimrc @@ -37,22 +37,24 @@ set incsearch " do incremental searching if &t_Co > 2 || has("gui_running") syntax on set hlsearch + set background=dark colorscheme wombat256mod + " colorscheme desert endif -" + "" Only do this part when compiled with support for autocommands. -"if has("autocmd") +if has("autocmd") " " " Enable file type detection. " " Use the default filetype settings, so that mail gets 'tw' set to 72, " " 'cindent' is on in C files, etc. " " Also load indent files, to automatically do language-dependent indenting. -" filetype plugin indent on + filetype plugin indent on " " " Put these in an autocmd group, so that we can delete them easily. -" augroup vimrcEx -" au! + augroup vimrcEx + au! " " " For all text files set 'textwidth' to 78 characters. " autocmd FileType text setlocal textwidth=78 @@ -60,19 +62,18 @@ endif " " When editing a file, always jump to the last known cursor position. " " Don't do it when the position is invalid or when inside an event handler " " (happens when dropping a file on gvim). -" autocmd BufReadPost * -" \ if line("'\"") >= 1 && line("'\"") <= line("$") | -" \ exe "normal! g`\"" | -" \ endif -" -" augroup END -" -"else -" -" set autoindent " always set autoindenting on -" -"endif " has("autocmd") -" + autocmd BufReadPost * + \ if line("'\"") >= 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + + augroup END + +else + set autoindent " always set autoindenting on + +endif " has("autocmd") + "" Convenient command to see the difference between the current buffer and the "" file it was loaded from, thus the changes you made. "" Only define it when not defined already. @@ -87,7 +88,23 @@ endif " " compatible). " set langnoremap "endif -" + +" Search down into subfolders +" Provides tab-completion for all file-related tasks +set path+=** + +" Display all matching files when we tab complete +set wildmenu + +" Better file browsing +let g:netrw_banner=0 " disable annoying banner +let g:netrw_browse_split=4 " open in prior window +let g:netrw_altv=1 " open splits to the right +let g:netrw_liststyle=3 " tree view +let g:netrw_list_hide=netrw_gitignore#Hide() +let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' + + map <F2> :tabnew map <F3> :tabprevious<CR> map <F4> :tabnext<CR> diff --git a/tools/index.html b/tools/index.html index e2eef45..0afdf3e 100644 --- a/tools/index.html +++ b/tools/index.html @@ -27,10 +27,13 @@ <ul> <li><a href="vim.html#vimrc">1. Vim RC</a></li> <li><a href="vim.html#color">2. Color schemes</a></li> - <li><a href="vim.html#spacetab">3. Split and tab</a></li> - <li><a href="vim.html#block">4. Editing Files</a></li> - <li><a href="vim.html#spellcheck">5. Spell check</a></li> - <li><a href="vim.html#plugin">6. Plugins</a></li> + <li><a href="vim.html#split">3. Split and tab</a></li> + <li><a href="vim.html#filebrowser">4. File browser</a></li> + <li><a href="vim.html#block">5. Editing files</a></li> + <li><a href="vim.html#ctags">6. Tags</a></li> + <li><a href="vim.html#spellcheck">7. Spellcheck</a></li> + <li><a href="vim.html#plugin">8. Plugins</a></li> + <li><a href="vim.html#vimdiff">9. Vimdiff</a></li> </ul> </li> <li><a href="gnupg.html">Gpg</a> diff --git a/tools/scripts/pkgmk-test.conf b/tools/scripts/pkgmk-test.conf index c5f70e4..14248aa 100644 --- a/tools/scripts/pkgmk-test.conf +++ b/tools/scripts/pkgmk-test.conf @@ -4,7 +4,7 @@ source /etc/pkgmk.conf -PKGMK_SOURCE_MIRRORS=(http://c1.ank/distfiles/) +#PKGMK_SOURCE_MIRRORS=(http://c1.ank/distfiles/) PKGMK_SOURCE_DIR="$PWD" PKGMK_PACKAGE_DIR="$PWD" PKGMK_WORK_DIR="$PWD/work" 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. |