Presentations
tisnik 0x40 centrum 0x2e cz>
$VIMRUNTIME/
echo $VIMRUNTIME
~/.vim
~/.vim/bundle
ve vlastních adresářích mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
execute pathogen#infect()
call pathogen#helptags()
set nocompatible
dříve než execute pathogen#infect()
!!!wget http://www.vim.org/scripts/download_script.php?src_id=22726
~/.vim/bundle
:help airline
:set laststatus=2
:AirlineToggle
:AirlineRefresh
:AirlineTheme dark
:AirlineTheme wombat
:AirlineTheme jellybeans
:AirlineTheme <Tab>
git clone git://github.com/altercation/vim-colors-solarized.git
~/.vim/bundle
:call pathogen#helptags()
:help solarized
:colorscheme solarized
:colorscheme <Tab>
:set background=dark
:set background=light
git clone git://github.com/nathanaelkane/vim-indent-guides.git
~/.vim/bundle
:IndentGuidesEnable
:IndentGuidesDisable
:IndentGuidesToggle
:let g:indent_guides_indent_levels = 30
~/.vim/bundle
:call pathogen#helptags()
:help fugitive
:Git cokoli
:Gstatus
:Gcommit (spousta příkazů)
:Gbrowse
:Gblame :-)
:Gvdiff
~/.vim/bundle
:Gist
:Explore
:HExplore
i
, ?
)vim scp://uživatel@jméno_vzdáleného_počítače/cesta
vim ftp://jméno_vzdáleného_počítače/cesta
:NetUserPass
:e ftp://uživatel@jméno_vzdáleného_počítače/cesta
:NetrwSettings
g:netrw_ftp_cmd="ftp"
g:netrw_http_cmd="elinks"
g:netrw_sftp_cmd="sftp"
:TlistAddFiles *.c
:Tlist
:TlistAddFilesRecursive .
:Tlist
~/.vim/bundle
:help NERDTree
:NERDTree
?
):echo maplocalleader
<leader>cc
<leader>cn
(nesting)<leader>c<space>
- přepíná:call VimCommanderToggle()
:map
–cokoli– :call VimCommanderToggle()<cr>
TAB
= Go to the other panel.F3
= View file under cursor.F4
= Edit file under cursor.F5
= Copy file.F6
= Move/rename file.F7
= Create directory.F8/DEL
= Remove file.F10
= Quit VimCommander.C-R
= Refresh panels.Backspace
= Go to parent directory.C-U
= Exchange panels.C-Left
= Put directory under cursor on other panel, or grab other panel’s dir.C-Right
= Same.\H
= Show hidden files (toggle).INS
= Select file under cursor."+"
= Select file by pattern."-"
= De-select file by pattern.S-F4
= Edit new file.C-t
= Previous directory.C-y
= Next directory.ctags
cscope
:cscope add cscope.out
:cs show
:cs f f stdio.h
:cs f t xyzzy
:cs f g test
:cs f d main
:cs f c fclose
:set shiftwidth=???
:set cindent
:set cinoptions
fN
úroveň posunutí otevírací levé závorky { pod jménem funkce:N
úroveň odsazení větví case/default v konstrukci switch-case=N
odsazení příkazu/příkazů za klíčovým slovem case/defaultbN
odsazení příkazu break v konstrukci switch-casehN
podobné volbě =N, ale platné pro klíčová slova public atd. (C++)- Speciální nastavení pro Makefile
```
augroup __makefile__
au!
au BufRead,BufNewFile Makefile set noexpandtab
augroup END
```
Ctrl+X Ctrl+L
Ctrl+X Ctrl+N
Ctrl+X Ctrl+I
Ctrl+N
, ovšem prohledávají se i všechny vkládané (included) souboryCtrl+X Ctrl+K
Ctrl+N
, ovšem slova se hledají v souborechCtrl+X Ctrl+T
Ctrl+T
, ovšem slova se hledají v souborechCtrl+X Ctrl+]
Ctrl+X Ctrl+F
Ctrl+X Ctrl+D
Ctrl+X Ctrl+U
Ctrl+X Ctrl+O
ctags
Enter
přeskok kurzoru na definici metody/atributuo
dtto, ale otevře se nové oknoSpace
prototypu
updates
sort by nameq
quit/close+
rozbalení podstromu-
zabalení podstromu*
rozbalení celého stromux
skrytí či zobrazení okna se zdrojovým kódemVimClojure - http://www.vim.org/scripts/script.php?script_id=2501
screen
a posílání příkazů do běžícího REPLu:%!xmllint --format -
:'<,'>!xmllint --format -
:map =. :%!xmllint --format - <cr>