8
votes
Accepted
What does breakat&vim mean?
It resets the breakat option to the Vim default: ^I!@*-+;:,./?.
Where ^I stands for the tab character.
You get the corresponding help paragraph with the :help :set-default command.
:se[t] {option}&...
3
votes
how to delete every char except newline?
To remove all content of a line, you can use the :substitute command (see :help substitute) like this:
:s/.*//
It will substitute any character (.), repeated 0 or more times (*) with nothing. It will ...
3
votes
Accepted
Function for recursive linebreak
A solution to review the paragraph you are in is:
gqip
Where:
gq reformat them according to textwidth
ip current paragraph
If you want that to be made for all paragraph while they are edited a ...
2
votes
how to delete every char except newline?
I am not sure why you want to do it, but here we go:
:%norm! D
This keeps the newlines, but makes every line empty.
Or if you want to delete the whole buffer completely, including the line breaks:
:%...
2
votes
Function for recursive linebreak
I ended up making the following macros that are working well for me:
function RecursiveLinebreak()
call feedkeys("\gq")
call feedkeys("\ip")
endfunction
autocmd FileType ...
1
vote
Any .vimrc hacks to make vim automatically start a new line when you exceed line length?
To have the desired behavior for the text file I would add the following line to ~/.vimfiles/ftplugin/text.vim or ~/.vimfiles/after/ftplugin/text.vim:
:setlocal textwidth=80
:setlocal formatoptions+=t
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
line-breaks × 62wrapping × 13
vimrc × 8
formatting × 8
vimscript × 5
substitute × 4
whitespace × 4
command-line × 3
filetype-markdown × 3
key-bindings × 2
syntax-highlighting × 2
search × 2
indentation × 2
insert-mode × 2
functions × 2
register × 2
save × 2
multiple-lines × 2
neovim × 1
cursor-motions × 1
folding × 1
macro × 1
terminal-buffer × 1
variables × 1
filetype-python × 1