Vim Techniques 14 - Executing vim commands at command line before editing the file

Опубликовано: 14 Февраль 2026
на канале: haxpor
346
6

Executing vim commands at the command line stage even before editing the file gives much of flexibility as well as offers a streamlined workflow. Not to mention if we combine this with bash alias & function in our ~/.bash_aliases , things can go wild and become faster.

This involves vim's command line's flags like "-c", "--cmd", and possible even with "+{command}".

This video will refer back to techniques I already covered in the past videos, so be alerted while watching this video as I linked-in them along the way.

3 examples + integration with bash_aliases are present + wrapping things up.

Any questions, suggestions, or comments, please feel free to add your comment below!

---
This video captured on native Ubuntu 20.04.

-- Chapters --
0:00 Introduction
1:01 1st Example - jumping to target symbol
4:47 Use "-c" flag
5:29 Use "--cmd" flag
5:33 Difference between "-c" and "--cmd"
7:10 2nd Example - forcing syntax on file
10:43 3rd Example - :)
11:59 Further fasten the workflow with bash's alias & function
13:00 bash_aliases setup - viewdiff
14:24 bash_aliases setup - viewcpp
14:40 bash_aliases setup - vimsmile
15:24 bash_aliases setup - vimts
16:18 wrap-up (included limitation)

---


Sorry I messed up my camera resolution, next time will go back to normal :D

#vim #vimtechniques


-- Follows Wasin on socials --
Website: https://wasin.io
Twitter: @haxpor
LinkedIn:   / wasinthonkaew  
Github: https://github.com/haxpor