SOURCES•Homepage-vim.org•Reference-vimhelp.org/quickref.txt.html•DocumentationI-vimhelp.org•DocumentationII-vimhelp.org/usr_toc.txt.html•FAQ-vimhelp.org/vim_faq.txt.html•Wiki-vim.wikia.com/wiki/Vim_Tips_Wiki•BramMoolenaar-moolenaar.net/habits.html•BenMcCormickI-benmccormick.org/2014/06/30/learning-vim-in-2014-the-basics•BenMcCormickII-benmccormick.org/2014/07/02/learning-vim-in-2014-vim-as-language•TutorialsPoint-tutorialspoint.com/vim/index.htmINSTALLATION# apt-get install vim gvim vim-doc vim-scripts $dpkg-Lvim-doc# update-alternatives --config editor$vim--version|lessCONFIGURATION# update-alternatives --config editor$vim~/.bashrc>EDITOR=/usr/bin/vim>VISUAL=$EDITOR>exportEDITORVISUALVIMRC$vim~/.vimrc>syntaxonsyntaxoff>setnunonu>setrelativenumbernorelativenumber>setcursorlinenocursorline>setincsearchnoincsearch>setshowmodenoshowmode>setshowcmdnoshowcmd>setrulernoruler>sethlsnohls>setbackground=dark>setencoding=utf8>setmouse=a>setautoindent>settabstop=3>setsofttabstop=3>setshiftwidth=3>setexpandtab>nmap<leader>w:w!<cr>>map<F2>:echo'Current time is '.strftime('%c')<CR>>map<F5>:setlist!<CR>>map<F6>:setlocalspell!spelllang=en_us<CR>>:abpsvmpublicstaticvoidmain(String[]args){<CR>}<Esc>ko>:absysoutSystem.out.println("");<Esc>2hiVIM-SESSION01tutorial$firefoxvim-adventures.com&""tutorialII$vimtutoren02docu$manvim""docuII$firefoxfile:///usr/share/doc/vim-doc/html/index.html &""docuIII:helpuser-manual•^]^o""docuIV:helpedit:helpgrep^d^u03buffer$^xe""buffer:edit""buffer$vim-O~/.vimrc ~/.bashrc^ww^wr^wc^wq""buffer$vim~/.bashrc ~/.bashrc:args:ls:next:previous:n:N""buffer:buffers:badd:b1:b2:bn:bp:bf:bl04motion^d^uHMLzzzbztz<enter>z-lhjk05insertiIsSaAoOC06window:setnunonu""window:setrelativenumbernorelativenumber""window:sethlsnohls*""window:setrulernoruler""window:setlinebreaknolinebreak""window:callmatchadd('colorColumn','\%81v',100)""window^ws^wv^wr^wc^wq""windowggG^g50%^e^y^n^u^d^f^b07repeat.08macroqa:rega@a09clipboardvj"+y
10 search / f * # :set incsearch :nhls
11 change ~
"" change :%s/one/two/g
"" change :set hls * cw n :set nohls
"" change ci( ci{ ci<
12 delete x d$ diw dit di"dipdas13undoredouU^r14match[InsertMode]^n15abbreviate:ab:abc:unab^v16markm1'1`1marks17foldzf5jzozczd18visualv^v19textobjectsiwiti" ip as f F t T /
99 exit :wq :q! ZZ ZQ
INSERT MODE
i : Insert text before the cursor.
I : Insert text before the first non-blank in the line.
s : Delete character under the cursor and start insert mode.
S : Delete line and start insert mode.
a : Enter insert mode after cursor.
A : Enter insert mode at the end of the line.
o : Enter insert mode on the next line.
O : Enter insert mode on th above line.
C : Delete from cursor to end of line and begin insert.
TEXT OBJECTS
iw : inner word
it : inner tag
i":innerquotesip:innerparagraphi{:innerbracketsas:asentencef,Ft,T/ABBREVIATIONS:abpsvmpublicstaticvoidmain(String[]args){<CR>}<Esc>ko:absysoutSystem.out.println("");<Esc>2hi^v:deaktivateab
# apt install screenDOCUMENTATION$manscreen$w3mgnu.org/software/screen/manual/screen.html•ctrla?:KeybindingsSESSIONS$screen-Sfirstsessionglances$screen-X-Sfirstsessionquit$screen-ls:Listscreensessions$screen-r:Reattaching$screen-x:Attachtoanotdetachedscreensession•ctrlad:Detachsession•ctrlax:LocksessionWINDOWS•ctrlac:Createwindow•ctrlaA:Renamewindow•ctrlaa:Togglewindow•ctrla[0..9]:Togglewindow•ctrla|:Splitwindowvertically•ctrlaS:Splitwindowhorizontally•ctrlaX:Killpane•ctrlan:Nextwindow•ctrlap:Previouswindow•ctrlak:Killwindow•ctrla\:Killallwindows•ctrlaw:Windowbar•ctrla":Windowlist•ctrlah:HardcopyEXAMPLE$screen-Sfirstsession•ctrlaS•ctrla|$htop•ctrla<tab>•ctrlac$atop•ctrl<tab>•ctrlac$df-hTCONFIGURATION# vim /etc/screenrc$vim~/.screenrc
015•SHORTCUTS
DAILYUSE•<ctrl>+zfgbgjobs<ctrl>+u<ctrl>+k<ctrl>+w<alt>+.<bash-vim-mode>CHARACTER•ctrlf:Moveforwardonecharacter•ctrlb:Movebackwardonecharacter•ctrlh:Generateabackspacecharacter•ctrld:DeleteonecharacterEDITOR•ctrlxe:EditorDESKTOP•altF2:RunCommandHISTORY•ctrlr:Searchfromhistorysearchingmode•ctrlg:Escapefromhistorysearchingmode•alt.:UsethelastwordofthepreviouscommandLINE•esc# : Making the line a comment•ctrla:Gotothebeginningoftheline•ctrle:Gototheendoftheline•ctrlxx:Movebetweenstartofcommandlineandcurrentpositionandbackagain•ctrleu:Cleartheline•ctrlk:Deletefromcursortotheendoftheline•ctrlu:DeletefromcursortothestartofthelineTERMINAL$gnome-terminal•ctrlaltF3•reset:Resettheterminal•ctrldorexit:Exittheterminal•shutdown-hnow:ShutdownthesystemSCREEN•ctrl+-:Size•ctrll:Clearthescreen•ctrls:Stopoutputtothescreen•ctrlq:Allowoutputtothescreen
$vim~/.bashrc>HISTCONTROL=ignoreboth:erasedups>aliash='clear; echo; history 30; echo'>set-ovi>bind-mvi-insert"\C-l":clear-screen>EDITOR=/usr/bin/vim>VISUAL=$EDITOR>exportEDITORVISUAL
# mkdir -p /media/ramdisk# vim /etc/fstab>none/media/ramdisktmpfsnodev,nosuid,noexec,nodiratime,size=1024M00# mount -a$mount|column-t
006•RAM-DISKTEMPORARY
# mkdir -p /media/ramdisk $mount|column-t# mount -t tmpfs -o size=1024M tmpfs /media/ramdisk# mount -a$mount|column-t
005•SOURCES.LISTFORDEBIAN-STRETCH
•# vim /etc/apt/sources.list•# Security updates•debhttp://security.debian.org/debian-security stretch/updates main contrib non-free•deb-srchttp://security.debian.org/debian-security stretch/updates main contrib non-free•# Base repository•debhttp://ftp.de.debian.org/debian/ stretch main contrib non-free•deb-srchttp://ftp.de.debian.org/debian/ stretch main contrib non-free•# Stable updates•debhttp://ftp.de.debian.org/debian/ stretch-updates main contrib non-free•deb-srchttp://ftp.de.debian.org/debian/ stretch-updates main contrib non-free•# Stable backports•debhttp://ftp.debian.org/debian stretch-backports main contrib non-free•deb-srchttp://ftp.debian.org/debian stretch-backports main contrib non-free•# Virtualbox•debhttps://download.virtualbox.org/virtualbox/debian stretch contrib