diff --git a/.vimrc b/.vimrc index 5bc3840..eede72b 100644 --- a/.vimrc +++ b/.vimrc @@ -1,29 +1,39 @@ "VIEW config - syntax off - filetype off - set number +syntax off +filetype off +set number + "INDENT config - filetype plugin indent on - " show existing tab with 4 spaces width - set tabstop=4 - - " when indenting with '>', use 4 spaces width - set shiftwidth=4 - - " On pressing tab, insert 4 spaces - set expandtab +filetype plugin indent on +"" show existing tab with 8 spaces width +set tabstop=8 +" +"" when indenting with '>', use 4 spaces width +set shiftwidth=4 +" +"" On pressing tab, insert 4 spaces +set expandtab +set autoindent + "MACROS config - vnoremap "hy:%s/h//gc - nnoremap :w +vnoremap "hy:%s/h//gc +nnoremap :w + "LaTEX config vnoremap c{\bfseries "} -vnoremap c{\"}%2lii "PLUGIN config - let g:NERDTreeNodeDelimiter = "\u00a0" - execute "set =\en" - nnoremap :NERDTree +let g:NERDTreeNodeDelimiter = "\u00a0" +execute "set =\en" +nnoremap :NERDTree + +"MACROS +"PASCAL +:iab fii ^ifunction eli(lxea: integer): integer; + \begin + \end;O + diff --git a/new-info.txt b/new-info.txt index b1e505f..5995306 100644 --- a/new-info.txt +++ b/new-info.txt @@ -1,5 +1,4 @@ Commands: - ZZ -- write out and exit 75 i ! -- insert "!" 75 times 75 a ! -- append "!" 75 times @@ -251,8 +250,8 @@ Commands: BTW it's possible to edit compressed formats (.Z, .gz, .bz2) Making corrections (24): - CTRL-W -- delete word - CTRL-U -- delete until beginning + CTRL-W -- delete word (in insert mode) + CTRL-U -- delete until beginning (in insert mode) CTRL-P -- complete the word or repeate previous. (P)revious CTRL-N -- complete the word. (N)ext There is OMNI completion (like intelisence). Check it out later. @@ -317,6 +316,62 @@ Commands: It's all about shrimping a bunch of lines to one. === I SKIPED REST OF TUTOR, BACK LATER === + Moving through programs (29): + ctags *.c -- to generate the tags file for all C files in the current + directory + :tag function_name -- jump to function definition + CTRL-] -- jump to the definition of the function under cursor + CTRL-T -- jump back + :tags -- show the list of tags that you traversed through + :stag tagname -- open new window with file from tag under cursor + CTRL-W ] -- split the current window and jump to the tag under the + cursor. If a count is specified, the new window will be that many lines + high. + ctags -R . -- generate tags from the whole directory tree + :tnext -- go to next tag match + :tprevious -- go to previous tag match + :tfirst -- go to first tag match + :tlast -- go to last match + Mini recipe: + vim + :vsplit functions + :nnoremap 0yew:tag " + CTRL-W } -- open tag preview + % -- on #if, #endif, #endif: jump on macros processor instructions + [# OR ]# -- if cursor inside preprocessor macroses, you will jump on + BEGININ or END of that macros + [[ OR ][ -- jump on begin or end of the outer code block + [{ OR ]} -- jump on begin or end of the current code block + [( OR ]) -- like above, but works with curle braces + ]] -- move forward to the start of the next function + [] -- move backward to the end of other function + [/ OR ]/ -- move back to the start of a comment (/* */) + [I -- find definition of the variable under cursor + [ -- next definition + gd -- jump on the variable declaration in the current subprogram + gD -- jump on the variable declaration in the current file + + Editing programs (30): + :make {arguments} -- compile a program + :cnext -- move to the next error from program compiling + :cc -- show whole error message + :clist -- get overview of all error messages + :clist! -- see all messages from compiler + :cfirst -- to the first errorc + :clast -- to the last error + :cc 3 -- to error 3 + You can also change Make to other autobuild tool + :colder / :cnewer -- jump to the previous or next error list + :compiler msvc -- switch compiler to other + :set cindent shiftwidth=4 -- turn on automatically indent + == -- re-indent current line + VISUAL BLOCK + = -- reindent selected lines + =a{ -- reindent current block + gg=G -- reindent the whole file + LOOK for cinoption-values to configure reindent configuration in VIM + :filetype indent on -- switch on the 'cindent' option manually every + time you edit a file + Hints: There is lowercase and uppercase marks. Uppercase marks are global, they