Can we have Vim Tips thread?
Replace two or more spaces between words using regex
%s/ \{2,}/ /g
Can we have Vim Tips thread?
Replace two or more spaces between words using regex
%s/ \{2,}/ /g
Other urls found in this thread:
blog.carbonfive.com
houseofthud.com
twitter.com
:q to quit.
!pkill vim
Shift ZZ to save and quit
g;
Go back to last edited location
Thank you. This is actually useful, unlike some others here.
Looking at you,
use your fucking mouse tanny
blog.carbonfive.com
read this whole thing
understanding text objects will unlock vim's potential
also cannot recommend these enough
tpope/vim-surround # change " to ' or (. Surround objects with quotes, brackets, etc
tpope/vim-commentary # comment lines out
and as a corollary
tpope/vim-repeat
based
cib to change text in brackets
spacemacs 'end-thread
set mouse=a
Use vilearn rather than vimtutor.
I use vim entirely for writing text (i.e. not code) and text objects are like mana from heaven.
Never understood why people use vim over nano. Like nano can do all shit vim does. Just pressing Insert to edit something is already a turn off for me.
>Like nano can do all shit vim does
It can't do one percent of what vim or emacs can do.
In this case, you never actually learned vim.
Not that user but expanding in the matter:
g; g,
Go to [count] older/newer position in change list.
To move back and forward in the list of your previous edit locations
'.
:help changelist
Also:
gi
Go to insert mode where you last left it
You are not learning anything and even using Vim you would be only a monkey pressing keys... or in other words: you dont get it
q: command history
H top row
M middle row
B bottom row
Set rnu relative line numbers
. Repeat
Ysiw' surround word with '
All this shit is already on line....
Why not just use vim layer on emacs? VIMtards never fail to amaze me with their notepad from 90s
Enter visual mode
Select function body, class body or any specific area you wanna search on
the :
Then search /%Vpattern and youll be finding only the prev selected area
Also works with :%s
but fags prolly know this
if I'm going to be using vim anyway why add a layer of bloat around it?