Skip to content

Instantly share code, notes, and snippets.

View Buttars's full-sized avatar
😎
Coding Shiz

Landon Buttars Buttars

😎
Coding Shiz
View GitHub Profile
@Integralist
Integralist / Examples.md
Last active September 4, 2025 05: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.

@histrio
histrio / first.sh
Last active May 1, 2020 20:06
arch install cheatsheet
#!/usr/bin/env sh
# ( O O )
# =======oOO=(_)==OOo======
# arch install script
# author Rinat Sabitov aka histrio
# created: May 2015
# modified: Dec 2016
# =======oOO======OOo======