The screenshot of vim-gitgutter
clearly shows its author uses some kind of continuation line character when wrap
is on. How do I get that? I thought I could find it listed in :help 'listchars'
, but it's not.
1 Answer
Use the 'showbreak'
option. From :h 'showbreak'
:
'showbreak' 'sbr' string (default "") global or local to window |global-local| String to put at the start of lines that have been wrapped.
It looks to me like they are using the Unicode character ↪ (Rightwards Arrow with Hook, U+21AA). To enter a Unicode character into Vim, use :h i_CTRL-V
.
After typing Ctrl+v, you can hit u and type the hexadecimal representation of the desired Unicode character (as specified in :h i_CTRL-V_digit
).
So, to type ↪, you would perform the following keypresses while in insert or command-line mode:
Ctrl+v u 21aa
Then, you can set showbreak=↪
in your .vimrc
.
-
3It's a bit strange it has an option for its own and isn't part of
listchars
.– EnlicoNov 27, 2020 at 8:20 -