Is there an easy way to display whitespace characters such as space and tab in gvim? Something like what is implemented in Gedit, Geany, Komodo, and other GUI editors where (when the option is turned on) spaces show as a muted or greyed-out '.' and tabs as '-->'.
To see all the spaces inserted within this file of data, you need to add the “hls” command on the command area of Vim. So, after adding the text within the Vim text file, navigate towards the normal mode by pressing the Esc key. Press the “:” character to open the command area.
set tabstop=4 : tells Vim to display 4 spaces on the screen wherever there is a Tab character. set expandtab : tells Vim to insert 4 spaces instead of a Tab character when user press <Tab> on insert mode.
With the following, and the default backslash Leader key, you can type \wn to switch highlighting on, and \wf to switch it off. With Vim 7.1. 40 and later, you can use the matchadd() function to define matches (making the :match command available for other purposes).
Of course, if you're using Vim's GUI, GVim, you can also use the mouse to switch between tabs or use keyboard shortcuts. In GVim, you can also access a context menu for tabs by right-clicking on the tab bar. Here you can open new tabs with a new buffer or an existing file, or close the current tab.
Check out listchars
and list
options in Vim. An example use of this feature:
" part of ~/.vimrc " highlight tabs and trailing spaces set listchars=tab:>-,trail:- set list
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With