#vimtrick
open vim in diff mode:

vim -d file1.c file2.c

really nice #vimtrick to align columns 🤯

1. visual select
2. replace separator by separator+spaces (e.g.: `:s/=/= /)
3. place cursor after longest word on first column
4. remove extra whitespace with `dw`

https://stackoverflow.com/questions/1229900/reformat-in-vim-for-a-nice-column-layout/28414916#28414916

reformat in vim for a nice column layout

I have this dataset in a csv file 1.33570301776, 3.61194e-06, 7.24503e-06, -9.91572e-06, 1.25098e-05, 0.0102828, 0.010352, 0.0102677, 0.0103789, 0.00161604, 0.00167978, 0.00159998, 0.00182596, 0.0...

nice #vimtrick:

:g/^#/#

when editing markdown, prints a ToC to jump to the header you want.
https://vimrcfu.com/snippet/165

Quick Markdown navigation/TOC | vimrcfu

Snippets of vimrc awesomeness.

#vimtrick
q: how to break a line at cursor position (and keep on normal mode)?
a: press "R" "Intro" "Esc" keys
#vimtrick
q: how to scroll both files/windows at the same time?
a: `:set scrollbind` in both windows (`:set noscrollbind` to disable)

#vimtrick
q: repeat last colon command
a: first `@:`, further repeats `@@`

https://vim.fandom.com/wiki/Repeat_last_colon_command

Repeat last colon command

The last command entered with':' can be repeated with@: and further repeats can be done with@@ This is useful for commands like:bnext or:cNext.

#vimtrick
q: how do i activate spellcheck in vim?
a: `:setlocal spell spelllang=es`

q: how do i deactivate it?
a: `:setlocal spell!`

#vimtrick
q: how do i jump to the next double-quote (")?
a: press `f"`, or `F"` to go backwards
#vimtrick
q: what's the difference between `cw` and `cW`?
a: a word (lowercase w) ends at any punctuation OR white space, while a Word (uppercase w) ends only at whitespace
#vimtrick
q: how do i resize a split window?
a: either write `:30winc >`, press "30" "Ctrl+W" ">" or write `:vertical resize 60`