1) If you read the vim help on 'listchars'
, you'll see that it provides a trail:c
option that can be used to mark trailing spaces with a custom character c
. I assume that's the option you are currently using. Fortunately, as of patch 7.4.711 (also see the changelog), 'listchars'
now supports a space:c
option that can be used to mark all spaces with a character c
. So you can use that, if your version of vim is recent enough. (Note that the online vim help page I just linked to seems to be a bit out-of-date at the moment, so it doesn't mention the space:c
option.) For example:
:set lcs+=space:.
With regard to putting >
at the beginning of the current line, I believe that's not possible. So I'm afraid you're out of luck, unless someone else knows a trick I'm not aware of.
Finally, you can use the tab:xy
option to put something instead of tabs. I actually like to use a couple of Unicode characters for this:
:set lcs+=tab:•·
2) What you're looking for here is mapping. You should note that "Shift + T" is actually just capital T, since shifting a letter key sends the capital variant of the letter on all modern computers. So you can do what you want with this:
nmap T <C-a>
This will set up T to increment the number under the cursor, which is the normal function of ^a.
Finally, with regard to mapping alt-modified arrow keys, this can be tricky, because it depends on which platform you're running vim on, e.g. whether you're running gvim on Windows or a terminal build on a Unix platform. If gvim, you can use the straightforward <M-...>
codes:
nmap <M-Left> <C-w>h
nmap <M-Down> <C-w>j
nmap <M-Up> <C-w>k
nmap <M-Right> <C-w>l
But on other platforms, you'll need to figure out the escape sequences that might be sent when pressing a meta-modified arrow key, and map those. For example, when I run Cygwin vim in mintty on Windows, I can use this:
nmap <Esc>[1;3D <C-w>h
nmap <Esc>[1;3B <C-w>j
nmap <Esc>[1;3A <C-w>k
nmap <Esc>[1;3C <C-w>l
You should be able to figure out the escape sequences sent by a key combination by entering insert mode in a buffer (or command-line mode should work as well), pressing ^v, and then pressing the key combination. The characters that are inserted are the escape sequence sent by the key combination.
3) I've never used the NERD tree plugin before or tried mapping control-space, so I can't speak to this one. Perhaps you could ask a new question that focuses on this issue.