2

I set the setting in the vi file to spaces, and I want to verify that it is working correctly is there a way to test it ?

I know it is a trivial question but I am new to vi editor

user5324426
  • 693
  • 1
  • 5
  • 12
  • 2
    Try this answer: [Make Vim show ALL white spaces as a character](http://stackoverflow.com/a/29787362/5358968). Note this question belongs in the [vi and vim SE](http://vi.stackexchange.com/) – Steve Aug 12 '16 at 10:21
  • 1
    You could also just navigate using the arrow keys or `hjkl` and if your cursor jumps over an area, then it is a tab. If it moves one position at a time, then it is spaces. – reynoldsnlp Aug 12 '16 at 11:01
  • The correct answer is fiddling with `:set list` but a quick way to test is, with `set hlsearch` on (which it should either way) just do `/ ` (that's a search with one space) or `/\t` to highlight tabs. – iovis Aug 12 '16 at 11:37

1 Answers1

2

take a look at :set list / :help list

you can set listchars like so: set listchars=tab:>-,trail:~,extends:>,precedes:< " mark all kinds of whitespace

as an example, this setting will show tabs as > so you know where your tabs are.

useful links: Make Vim show ALL white spaces as a character

http://vim.wikia.com/wiki/See_the_tabs_in_your_file

Community
  • 1
  • 1
nabn
  • 2,324
  • 24
  • 26