User Tools

Site Tools


util:vim

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
util:vim [2015/11/11 17:15] – [Links] philutil:vim [2021/07/14 18:50] (current) – [Helpful Settings] Added fileformat option description phil
Line 44: Line 44:
  
 ===== Helpful Settings ===== ===== Helpful Settings =====
-^ Variable ^ Abbrev ^ Type ^ Meaning ^+^ Variable ^ Abbrev ^ Type ^ Effect ^
 | filetype | ft | String | defines the filetype, used for syntax highlighting | | filetype | ft | String | defines the filetype, used for syntax highlighting |
 | modeline | ? | Boolean | activates the interpretation of ''modelines'' | | modeline | ? | Boolean | activates the interpretation of ''modelines'' |
Line 52: Line 52:
 | textwidth | tw | Integer | specifies the maximum line length, longer lines will be broken after white space using <EOL> | | textwidth | tw | Integer | specifies the maximum line length, longer lines will be broken after white space using <EOL> |
 | linebreak | lbr | Boolean | wrap long lines, for displaying only (no changes are done to the file itself) | | linebreak | lbr | Boolean | wrap long lines, for displaying only (no changes are done to the file itself) |
 +| fileformat | ff | String | Set the format used when writing, e.g. ''set ff=unix\n:wq'' to convert a dos file to unix |
  
 Using this line in the ''.vimrc'' file, the cursor is placed at the last known position in the file when opening: Using this line in the ''.vimrc'' file, the cursor is placed at the last known position in the file when opening:
Line 57: Line 58:
  
 ===== Commands To Know By Heart ===== ===== Commands To Know By Heart =====
-^ Command ^ Meaning ^+^ Command ^ Effect ^
 | <nowiki>^g</nowiki> | show file status information | | <nowiki>^g</nowiki> | show file status information |
 | ZZ | like '':wq'', but vim-specific | | ZZ | like '':wq'', but vim-specific |
 +^ copy'n'paste ^|
 | yy | copy actual line to clipboard | | yy | copy actual line to clipboard |
-| p | paste clipboard **after** the cursor | +| p | paste **after** the cursor | 
-| P | paste clipboard **before** the cursor |+| P | paste **before** the cursor 
 +| "*p | Paste from "selection" clipboard (i.e., the regular clipboard) | 
 +| "+p | Paste from "desktop" clipboard (i.e., what applications use to copy into or paste from) |
 ^ Changing Modes^| ^ Changing Modes^|
 | I | insert at beginning of line | | I | insert at beginning of line |
Line 113: Line 117:
  
 ===== Ranges ===== ===== Ranges =====
-^ Example ^ Meaning +^ Example ^ Effect 
-| . | actual line | +| . | current line | 
-| 2,3 | all from line 2 till inclusively line 3 | +| 2,3 | all from line 2 till line 3 inclusively 
-| ^,$ | all from beginning of file till the end |+<nowiki>^,$</nowiki> | all from beginning till end of file |
 | +2,+3 | all from two lines after cursor till three lines after cursor | | +2,+3 | all from two lines after cursor till three lines after cursor |
  
Line 241: Line 245:
   * [[http://www.vim.org/scripts/script.php?script_id=610|ctags.vim script]]   * [[http://www.vim.org/scripts/script.php?script_id=610|ctags.vim script]]
   * [[http://vim.wikia.com/wiki/Accessing_the_system_clipboard|Accessing the System Clipboard]]   * [[http://vim.wikia.com/wiki/Accessing_the_system_clipboard|Accessing the System Clipboard]]
 +  * [[http://vim.wikia.com/wiki/VimTip188|Search Patterns]]
 +  * [[https://www.vim.org/scripts/script.php?script_id=1697|surround.vim script]]
 +
util/vim.1447262120.txt.gz · Last modified: 2015/11/11 17:15 by phil