text editor - To open Vim in specific ":" mode from terminal -
i use vim in inspecting data. start vim in specific ":" mode, instance processing binary data in terminal:
xxd -ps r328_0000.raw > /tmp/1 && vim /tmp/1 :%s/ffff//gn | ?
how can start vim in ":"-mode in terminal?
you can -c option (or +) this:
vim -c "%s/ffff//gn" vim +"%s/ffff//gn"
from manpage:
+{command} -c {command} {command} executed after first file has been read. {command} interpreted ex command. if {command} contains spaces must enclosed in double quotes (this depends on shell used). example: vim "+set si" main.c note: can use 10 "+" or "-c" commands.
Comments
Post a Comment