WalaWiki content from p1k3.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
3.7 KiB

  1. Stuff for VimEditor.
  2. = other people =
  3. * http://bullium.com/support/vim.html
  4. * http://www.tuxfiles.org/linuxhelp/vimcheat.html
  5. * http://www.cplug.org/guides/pharkas-vim/vimqrc.pdf - very pretty
  6. = brennen & co. =
  7. This was originally at: http://p1k3.com/2004/11/11/vimcheat, 'cause [[Levi]] wanted something for a laptop keyboard or similar area. Might need tweaking for that purpose. I'd suggest you import into your favorite document software and mess with font size. (Kindly preserve this iteration and make any changes to a copy below, if editing.)
  8. ----
  9. '''move:''' '''move/act on:''' '''search/jump/mark:'''
  10. '''e'''nd, '''b'''egin word /''pattern'' fwd
  11. ctrl-b '''$''','''0''' end, begin line ?''pattern'' back
  12. k '''(''',''')''' sentence back, fwd '''n'''ext ''pattern''
  13. { ( b h l w ) } '''{''','''}''' paragraph back, fwd '''*''' word under cursor
  14. j '''ctrl-b'''ack, '''ctrl-f'''wd page '''%''' matching bracket
  15. ctrl-f '''fA''' goes to next "A" '''m'''''x'' set mark ''x''
  16. '''tA''' before next "A" '''``''' go back, '''`'''''x'' to mark
  17. '''a'''ppend text '''d'''elete/kill text '''r'''eplace char
  18. '''R'''eplace text d''obj'' - dw, d$, etc. '''s'''ubstitute char
  19. '''i'''nsert text dd clears whole line '''u'''ndo, '''ctrl-r'''edo
  20. '''I'''nsert at start D to end of line '''p'''ut (paste)
  21. '''x''' kill char '''c'''hange - c''obj'', cc, C '''v'''isual mode
  22. '''X''' kill back '''y'''ank/copy - y''obj'', yy '''.''' repeat edit
  23. :s/''pattern''/''replacement''/g - replace all on line (g for multiple)
  24. :%s/''pattern''/''replacement''/gc - everywhere but ask first (c for confirm)
  25. - - - cut or fold here - - -
  26. '''file ops:''' '''windows (ctrl-w then key):'''
  27. :e ''file'' edit '''n'''ew, '''s'''plit current
  28. :w ''file'' write '''v'''ertical split
  29. :wq write & quit '''j''','''k''','''h''','''l''' to jump windows
  30. :r ''file'' read into buffer '''+''','''-''','''=''' to size windows
  31. :r !''command'' - get output '''f'''ile under cursor in new window
  32. :q - quit buffer/window :split ''file'' - new with ''file''
  33. '''format & misc tweaking:'''
  34. :set expandtab - use spaces '''J'''oin, '''gq'''''obj'' - autoformat
  35. :set shiftwidth=4 '''~''' change case of char
  36. :set textwidth=70 '''>>''','''<<''' indent, unindent
  37. :set nowrap '''=''' autoindent
  38. :''range''sort
  39. ''n'''''ctrl-a''', ''n'''''ctrl-x''' - inc or dec number by ''n''
  40. ----
  41. = alternate versions =
  42. Any suggestions? Alternate versions? Feel free to copy, paste, and modify below.
  43. Original version of bottom half:
  44. '''file ops:''' '''windows:'''
  45. :e ''file'' edit :new - new window
  46. :w ''file'' write :split - new on current
  47. :wq write & quit :split ''file'' - new window with file
  48. :r ''file'' read contents :vsplit - vertical split
  49. :r !''command'' - get output ctrl-w j,k,h,l to jump windows
  50. :q - quit buffer/window ctrl-w +,-,= to size windows
  51. '''format & misc tweaking:'''
  52. :set expandtab - use spaces '''J'''oin lines
  53. :set shiftwidth=4 '''gq'''''obj'' - autoformat obj
  54. :set textwidth=70 '''~''' change case of char
  55. :set nowrap '''>>''','''<<''' indent, unindent
  56. ''n''ctrl-a, ''n''ctrl-x - inc or dec number under cursor by ''n''