Open Vim Readonly
We can open Vim in read-only mode in two ways: vim -R <file> Or: view <file> A use case could be a file on a server with credentials that we want to read but be sure not to change. See man vim for more information.
We can open Vim in read-only mode in two ways: vim -R <file> Or: view <file> A use case could be a file on a server with credentials that we want to read but be sure not to change. See man vim for more information.
For each way you can map something in Vim, you can inspect those mappings. Check out this table of commands: COMMANDS MODES :map :noremap :unmap Normal, Visual, Select, Operator-pending :nmap :nnoremap :nunmap Normal :vmap :vnoremap :vunmap Visual and Select :smap :snoremap :sunmap Select :xmap :xnoremap :xunmap Visual :omap :onoremap :ounmap Operator-pending :map! :noremap! :unmap! Insert and Command-line :imap :inoremap :iunmap Insert :lmap :lnoremap :lunmap Insert, Command-line, Lang-Arg :cmap :cnoremap :cunmap Command-line :tmap :tnoremap :tunmap Terminal-Job To take a very practical one, :nmap will show you all of your normal mode mappings. Find a new command to try; you are not using them all (neither am I). ...
Today I discovered these two Vim flags: vim -w log.txt file vim -s log.txt file The -w flag sends all keystrokes in your session to log.txt. The -s loads Vim and replays all the keystroke back onto that file. ...
Longtime Vim users know the vimtutor program, which teaches you Vim in Vim. Vim 9.2 shipped with a new :Tutor command that improves on this. :Tutor ...
Vim-tiny is a great choice for remote server work. ...
I have a Vim normal mode mapping, and I don’t know where it comes from. My Vim config, a plugin, somewhere else? nmap shows me the mapping: :nmap gsp n gsp * 1z= And verbose nmap shows me where it comes from: :verbose nmap gsp n gsp * 1z= Last set from ~/.vimrc line 111 The setting is coming from inside the .vimrc!
In Vim Normal mode, * searches forward for the next occurrence of word. But what goes back? ...
Today, I’d like to dive deeper into a part of my practice: using a persisted text file for jotting things down. In this post, I’ll explain the ‘why’ behind this technique, and provide an updated version of it. ...
Today I’d like to share a small part of my practice: using a persisted scratchpad text file for jotting things down. ...
My development environment depends on several processes running. Here’s how I’ve scripted this setup. ...