Rundown: vim
Remotely edit a file with vim
1vim scp://${server}/~/${file}
Show a script in HTML
1source=~/.bashrc
2target=bash.html
3vim - --not-a-term -c '%TOhtml' -c "f ${target}" -c 'x!' -c 'qa!' < ${source}
Read info files with vim
1info ()
2{
3 [ -n "$1" ] && file="${1}" || file="$(ls /usr/share/info/ | sed 's/\.info.gz$//' | fzf )";
4 file="$(ls /usr/share/info/"$file"* | fzf -1 )"
5 vim "$file"
6}
Find and replace across all files open in vim
1:bufdo! %s/${pattern}/${replacement}/g
Find and replace words, but confirm each replacement
1vim -c "%s/${pattern}/${replacement}/gc" -c 'wq' ${file}