Gaurami’s Reviews > Practical Vim: Edit Text at the Speed of Thought > Status Update
Gaurami
is 41% done
Tip 44-45. Saving files
- status
:!mkdir -p %:h – to create a non-existing hierarchy of dirs
:w !sudo tee % > /dev/null – save changes in file requiring super-user access
Part III. Quick navigation. Tip 46-47
Keep fingers in the basic position
The screen lines (gj, gk) and the factual lines (j, k) are different
— Jun 06, 2023 09:49AM
- status
:!mkdir -p %:h – to create a non-existing hierarchy of dirs
:w !sudo tee % > /dev/null – save changes in file requiring super-user access
Part III. Quick navigation. Tip 46-47
Keep fingers in the basic position
The screen lines (gj, gk) and the factual lines (j, k) are different
Like flag
Gaurami’s Previous Updates
Gaurami
is 94% done
Tip 118. I've become quite a confident with Vim, don't need to consult with the book too often and as a result I hold over the book for a week or so. Today I reread the tips on words-autocompletion. Tip 117 (Autocomplete Sequences of Words) is quit useful.
— Jul 21, 2023 04:09AM
Gaurami
is 77% done
Substitution
:& (ampersand) – reuse prev subst.
:&& (double ampersand) – reuse prev subst. and keys in the current line
:g& = :%&&
— Jul 02, 2023 07:54PM
:& (ampersand) – reuse prev subst.
:&& (double ampersand) – reuse prev subst. and keys in the current line
:g& = :%&&
Gaurami
is 72% done
Read about search patterns. Eager to try those "very magic"/"very no magic" modes with offsets but don't have my laptop at hand.
— Jun 30, 2023 09:46AM
Gaurami
is 60% done
Tip 71. Macros.
Execute in series ("22") or in parallel.
Append a command ("qA")
Apply to several files (:argdo normal @a)
— Jun 24, 2023 09:57AM
Execute in series ("22") or in parallel.
Append a command ("qA")
Apply to several files (:argdo normal @a)
Gaurami
is 55% done
Tip 64. Paste and togglepaste. Couldn't figure out how to make ctrl-v and its alternatives work. Register "0 is the best.
— Jun 24, 2023 04:24AM
Gaurami
is 55% done
Tip 63.
\{reg} – in Insert mode past from register (" - unnamed, 0 - yank)
gp, gP – more useful than just p/P because leave the cursor at the end of the pasted text
Tip 64. Interact with the sys. clipboard.
:set autoindent
To avoid surprises, :set paste before and disable after addressing the sys. clipboard.
:set pastetoggle=\
— Jun 19, 2023 04:17AM
\{reg} – in Insert mode past from register (" - unnamed, 0 - yank)
gp, gP – more useful than just p/P because leave the cursor at the end of the pasted text
Tip 64. Interact with the sys. clipboard.
:set autoindent
To avoid surprises, :set paste before and disable after addressing the sys. clipboard.
:set pastetoggle=\
Gaurami
is 51% done
Tip 61-62
"0 – yank register
In visual mode p "swaps" selected text and the text in the unnamed register – bug or feature?
— Jun 16, 2023 09:15PM
"0 – yank register
In visual mode p "swaps" selected text and the text in the unnamed register – bug or feature?
Gaurami
is 51% done
Tip 60. {continue}
:reg{isters}
:reg "0 – check the yank register
"+ – system clipboard
"* – X11 primary last mouse selection
"= – expressions reg.
read-only regs: % (file name), : (last Ex command), / (last search pattern)
— Jun 14, 2023 04:29AM
:reg{isters}
:reg "0 – check the yank register
"+ – system clipboard
"* – X11 primary last mouse selection
"= – expressions reg.
read-only regs: % (file name), : (last Ex command), / (last search pattern)
Gaurami
is 50% done
Tip 58. m{Capital Letter} – global label. Develop a habit of setting global labels before using :vimgrep, :make and others.
Part IV. Registers. Chapter 10.
Tip 59. Del, copy, insert.
xp – swap symbols
ddp – swap lines
P – insert before the cursor
Tip 60. Get familiar with registers
delete/yank/put
"{register} – specify register
_ – "black-hole register"
"_d{motion}
Ex equivalents:
:delete c/:put c
0 – yank reg.
— Jun 14, 2023 04:22AM
Part IV. Registers. Chapter 10.
Tip 59. Del, copy, insert.
xp – swap symbols
ddp – swap lines
P – insert before the cursor
Tip 60. Get familiar with registers
delete/yank/put
"{register} – specify register
_ – "black-hole register"
"_d{motion}
Ex equivalents:
:delete c/:put c
0 – yank reg.
Gaurami
is 48% done
Tip 55. jumps list.
:jumps, -
hjklwWbB - not jumps
Tip 56. changes list.
:changes, g;-g,
`. – last change label (in place of dirty hack u)
`^ – location of the exit from Insert mode
gi – return to editing
Tip 57. go to file under cursor
gf
suffixesadd
:set suffixesadd+=.rb
:set path?
– to definition?
— Jun 13, 2023 04:50AM
:jumps, -
hjklwWbB - not jumps
Tip 56. changes list.
:changes, g;-g,
`. – last change label (in place of dirty hack u)
`^ – location of the exit from Insert mode
gi – return to editing
Tip 57. go to file under cursor
gf
suffixesadd
:set suffixesadd+=.rb
:set path?
– to definition?
