Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I find the default value (8) for tabstop is too much, so I tried to :set ts=4, but it doesnt work for me. :set all show the tabstop=4 value, but when I close a tab and open it again, ts is reset to be 8. How can I change the default ts value?

share|improve this question
add comment

2 Answers

Assuming jVi is similar to vi or vim there is a .vimrc file that contains defaults. The :set ts=4 command is temporary, to make it permanent you'll have to either add it to jVi's equivalent .vimrc file or if jVi is like vi and/or vim then it can allow you to embed the set commands right into the text file as comments. This feature is called modelines.

For example:

// vim: noai:ts=4:sw=4

or like this:

# vim: ts=4

They need to be within the last 5 lines of the file (this is configurable in vi/vim too).

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

I realize this is Netbeans editor jVi but I'm guessing that it shares a lot of the same features as vi/vim.

share|improve this answer
add comment

Go to:

Tools > Options > jVi Config > Buffer Modifications > 'tabstop' 'ts'

and set the value to 4 there.

From the manual:

The options shiftwidth, expandtabs and tabstop are per file options, so that any editor clones of a given file have the same value for these options. Different files can have different values for these options. The values set through the UI, in the Buffer Modification tab of the jViConfig options are the default values when a file is opened; setting the values in the UI is like putting them in a .vimrc

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.