Vim Visual Cheat Sheet Serge Y

Vim Visual Cheat Sheet Serge Y

Vim Visual Cheat Sheet Serge Y. Stroobandt Copyright 2016, licensed under Creative Commons BY-NC-SA This document is still under construction. Introduction Vim (and vi for that matter) is renowned for its notoriously steep learning curve. Figure 1: Comparison of editor learning curves Source: This should not scare you off. If you have not done so yet, first read “Why I Use Vim” If you cannot bother reading it, here is my personal break down. No, this is not an extreme case of fanboyhood. Vim is a way of life, or rather, a means towards extreme levels of productivity with the Vim–Markdown–Pan- doc–make input combo with any of the LaTeX/ConTeXt/XHTML/Prince/DZS- lides back‑ends. 1 Among other things, Vim will teach you to use a keyboard professionally; keeping your index fingers stuck to the home row.Vim allows you to edit texts lightning fast without resorting to any computer mouse or other pointing de- vice. Imagine the space you will gain on the folding table on your next transat- lantic business flight!ou Y will no longer have to use the Home , End or arrow keys, if you chose so. Vim’s predecessor vi has been around since 1976 and has been continuously improved ever since. If com- puter application has been around for such an ex- tended period in time, for sure, there must be a good reason to it! Are you not curious towards experienc- ing for yourself why? vi gang sign My interest in Vim grew out of my annoyance with other text editors not recognising words, parenthesis, brackets, etc. I got fed up with manually tapping the cursor to the desired edit- ing position. Vim is one of the few text editors which is a word processor in the true sense of the word. It is a word processor which effectively recognises word, bracket and parenthesis boundaries, counts words, etc. Vim continuously records a small macro of your last command combination, which is easily accessible through the dot . key. Don’t be deceived; this func- tionality is far more powerful than the usual repeat function! 2 Visual Cheat Sheet For English keyboards Figure 2: Vim visual cheat sheet for English keyboards 3 For German keyboards Figure 3: Vim visual cheat sheet for German keyboards Tutorial vi/vim graphical cheat sheet tutorial 4 version 1.1 April 1st, 06 Esc vi / vim graphical cheat sheet normal mode toggle external play prev eol goto "soft" repeat next begin end "soft" bol next ~ case ! filter @·macro # ident $ %match ^ bol & :s * ident (sentence )sentence _ down + line goto 2 "hard" prev auto3 `· mark 1 2 3 4 5 6 7 8 9 0 bol - line =format ex next end replace back yank undo insert open paste begin end Q mode WWORD E WORD R mode T· 'till Y line U line I at bol O above P before { parag. } parag. next end 1,3 insert open paste1 record replace 'till undo misc misc q·macro w word e word r· char t· y yank u i mode o below p after [· ]· 1 append subst delete "back" eof/ screen join help screen ex cmd reg. bol/ A at eol S line D to eol F·find ch Ggoto ln H top J lines K L bottom : line "· spec | goto col subst 1,3 6 delete find extra repeat goto not aappend s char d f· char g· cmds h j k l ; t/T/f/F '·mk. bol \· used! 4 back- change visual prev prev un- 3 3 find quit screen indent Z· X space C to eol V lines B WORD N(find) Mmid'l < indent > ?· (rev.) 5 delete 1,3 visual prev next set extra change reverse repeat find z·cmds x char c v mode b word n (find) m·mark , t/T/f/F . cmd /· moves the cursor, or defines Main command line commands ('ex'): Notes: motion the range for an operator :w (save), :q (quit), :q! (quit w/o saving) (1) use "x before a yank/paste/del command :e f (open file f), to use that register ('clipboard') (x=a..z,*) command direct action command, if red, it enters insert mode :%s/x/y/g (replace 'x' by 'y' filewide), (e.g.: "ay$ to copy rest of line to reg 'a') :h (help in vim), :new (new file in vim), requires a motion afterwards, (2) type in a number before any action operator operates between cursor & Other important commands: to repeat it that number of times destination CTRL-R: redo (vim), (e.g.: 2p, d2w, 5i, d4j) special functions, CTRL-F/-B: page up/down, extra (3) duplicate operator to act on current line requires extra input CTRL-E/-Y: scroll line up/down, (dd = delete line, >> = indent line) CTRL-V: block-visual mode (vim only) commands with a dot need (4) ZZ to save & quit, ZQ to quit w/o saving q· a char argument afterwards Visual mode: bol = beginning of line, eol = end of line, Move around and type operator to act (5) zt: scroll cursor to top, mk = mark, yank = copy on selected region (vim only) zb: bottom, zz: center words: quux(foo, bar, baz); (6) gg: top of file (vim only), gf: open file under cursor (vim only) WORDs: quux(foo, bar, baz); For a graphical vi/vim tutorial & more tips, go to www.viemu.com - home of ViEmu, vi/vim emulation for Microsoft Visual Studio Figure 4: Vi/vim graphical cheat sheet tutorial Vim game VIM Adventures From here on By now, you might have Vim is actually a word processor which you can easily modify and/or extend yourself. In other applications This work is licensed under a Creative Commons Attribution‑NonCommercial‑ShareAlike 4.0 International License. Other licensing available on request. Unattended CSS typesetting with . This work is published at https://hamwaves.com/vim.tutorial/en/. Last update: Monday, March 1, 2021. 5.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    5 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us