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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -