vim_notes
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
vim_notes [2020/09/30 22:14] – created raju | vim_notes [2023/08/02 18:18] (current) – [print full file name] raju | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== How can I ===== | ||
+ | ==== vertical alignment of columns ==== | ||
+ | * [[pretty_print_csv_data# | ||
+ | ==== show line endings ==== | ||
+ | * https:// | ||
+ | ==== change the encoding to utf-8 ==== | ||
+ | < | ||
+ | :set fileencoding=utf8 | ||
+ | :w myfilename | ||
+ | </ | ||
+ | Ref:- https:// | ||
+ | |||
+ | ==== insert newline in search and replace ==== | ||
+ | : | ||
+ | will insert a new line before each occurrence of 29. | ||
+ | * https:// | ||
+ | |||
+ | |||
==== join lines with a character ==== | ==== join lines with a character ==== | ||
:nmap J :s/\n/, /^M | :nmap J :s/\n/, /^M | ||
- | * https:// | + | |
+ | | ||
+ | |||
+ | ==== Preprocess files before diffing them ==== | ||
+ | * [[Preprocess files before diffing them]] | ||
+ | tags | vimdiff, sort | ||
+ | |||
+ | |||
+ | ==== print full file name ==== | ||
+ | |||
+ | * :echo expand(" | ||
+ | * :!ls %:p | ||
+ | * :!realpath % - be aware that realpath is not POSIX | ||
+ | * :!echo " | ||
+ | * 1 followed by ctrl-g - shows full path name but does not expand " | ||
+ | * :'<,'> | ||
+ | * set statusline+=%F - will show full filename in the status bar | ||
+ | * ctrl-g - shows file path relative to vim's current working directory | ||
+ | |||
+ | Ref:- http:// |
vim_notes.1601504050.txt.gz · Last modified: 2020/09/30 22:14 by raju