:imap mmm <Esc>
vmap '=y :w !pbcopy<CR><CR>
I copied two lines of vim map scripts. The first one has a leading colon while the latter one doesn't have.
So, what's the purpose of the leading colon?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this community:imap mmm <Esc>
vmap '=y :w !pbcopy<CR><CR>
I copied two lines of vim map scripts. The first one has a leading colon while the latter one doesn't have.
So, what's the purpose of the leading colon?
The colons don’t do anything.
The same commands can be typed into Vim interactively, in which case you need the colon to switch from normal mode to command-line mode.
When executing Vimscript from a file, the colons are not necessary, so it’s usual to omit them, but if they are included the commands will still work.