adding abbreviations
This commit is contained in:
parent
4ada6d83c9
commit
465233940d
44
.vimrc
44
.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
|
||||
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
|
||||
|
||||
" when indenting with '>', use 4 spaces width
|
||||
set shiftwidth=4
|
||||
|
||||
" On pressing tab, insert 4 spaces
|
||||
set expandtab
|
||||
|
||||
"MACROS config
|
||||
vnoremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>
|
||||
nnoremap <C-S> :w<CR>
|
||||
vnoremap <C-R> "hy:%s/<C-r>h//gc<left><left><left>
|
||||
nnoremap <C-S> :w<CR>
|
||||
|
||||
|
||||
"LaTEX config
|
||||
vnoremap <C-b> c{\bfseries <C-r>"}<Esc>
|
||||
vnoremap <C-t> c{\<C-r>"}<Esc>%2li<Space><Esc>i
|
||||
|
||||
"PLUGIN config
|
||||
let g:NERDTreeNodeDelimiter = "\u00a0"
|
||||
execute "set <M-n>=\en"
|
||||
nnoremap <M-n> :NERDTree<CR>
|
||||
let g:NERDTreeNodeDelimiter = "\u00a0"
|
||||
execute "set <M-n>=\en"
|
||||
nnoremap <M-n> :NERDTree<CR>
|
||||
|
||||
|
||||
"MACROS
|
||||
"PASCAL
|
||||
:iab fii <Esc>^ifunction <Esc>eli(<Esc>lxea: integer): integer;<CR>
|
||||
\begin<CR>
|
||||
\end;<Esc>O<BS>
|
||||
|
||||
|
||||
61
new-info.txt
61
new-info.txt
@ -1,5 +1,4 @@
|
||||
Commands:
|
||||
|
||||
ZZ -- write out and exit
|
||||
75 i ! <Esc> -- insert "!" 75 times
|
||||
75 a ! <Esc> -- 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 <buffer> <CR> 0ye<C-W>w:tag <C-R>"<CR>
|
||||
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
|
||||
[<Tab> -- 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user