Skip to content

Instantly share code, notes, and snippets.

View ggsalas's full-sized avatar

Gabriel Salas ggsalas

View GitHub Profile
@Integralist
Integralist / Examples.md
Last active February 7, 2024 22:56
[vim search and replace content using native vim cdo and cfdo commands] #vim #replace #macro #quickfix

There are two 'types' to be aware of with a quickfix window:

  1. entry: the actual line content (e.g. :grep foo will show a specific line that matched within a file).
  2. file: the actual file itself (e.g. the path to the file that contained the match).

To replace content using vim (via the quickfix window) you need to choose whether you want to apply the change via the quickfix 'entry' or via the 'file' as a whole.

If you use cdo, then your 'action' (i.e. how you're going to replace content) will be applied to every entry in the quickfix window.

If you use cfdo, then your action will be applied to each file in the quickfix window.

@just-boris
just-boris / .gitignore
Last active August 8, 2020 11:24
Shadow DOM as a React component: https://dist-bpvbyiobiw.now.sh
.cache
dist
node_modules
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Font
:set guifont=Source\ Code\ Pro:h14
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Hide pointless junk at the bottom, doesn't work in .vimrc for some reason?
:set laststatus=0
:set noshowmode "don't show --INSERT--
:set noruler "don't show line numbers/column/% junk