Change tab size to 4

 
Thread Tools Search this Thread
Special Forums Windows & DOS: Issues & Discussions Change tab size to 4
# 8  
Old 03-21-2013
It turns out that, as usual, vim has incredibly helpful diagnostic info:

From within vim or gvim, try the following:
Code:
:echo $HOME 
:echo $VIM 
:echo $VIMRUNTIME
:version

Open vimrc file - Vim Tips Wiki has more details

Just saw your post. My _vimrc does not have those source and behave lines.
It does have the nocompatible line.

Yes, those lines could well be the cause of the problem. You could comment them out as follows, and see what happens.

Code:
 " behave mswin

Are you saying :set nu does NOT show the line numbers when you manually enter from within vim or gvim?

Last edited by hanson44; 03-21-2013 at 12:29 AM..
# 9  
Old 03-21-2013
forum,

I commented out all those lines with no change.
I made an _vimrc file with only the line ":set nu" and again
with only "set nu", neither worked.

I don't know how to enter "set nu" directly into gvim and can't
find a place to set the path.

Keep giving me things to try and we'll figure this out.

jerryd
# 10  
Old 03-21-2013
My gvim (I normally just use vim) works the same as vim, along with the added menu at top.

You should be able to type :set nu command directly into gvim. The colon moves you to ex mode so you will see the : at the bottom. Then type in set nu command (set nu) and press ENTER. Hopefully, the line numbers appear!

Once that works, you should be able to type in the other diagnostic commands like :version and the others, to figure out where gvim thinks _vimrc lives.

According to that article, you can even directly edit the _vimrc file, whichever one vim is using, from within vim or gvim, with :e $MYVIMRC command.

The _vimrc lines do NOT start with : colon. The : is only needed from within vim, to switch to ex mode.
# 11  
Old 03-21-2013
On UNIX Systems, vi (and ex) will look for the EXINIT environment variable. If it is set, it names a file containing ex commands. If the file exists, is readable, and the file's owner matches the current process's UID; then vi will read initialization commands from that file. If not; vi will look for the file .exrc in the user's home directory. After that, vi will look for .exrc in the current directory.

On Windows, it could be looking for _exrc instead of .exrc. With vim instead of vi, it could also be looking for .vimrc or .virc (or _vimrc or _virc) instead of or in addition to .exrc (_exrc).

If you can figure out which file your vi or vim is trying to read, the command you want to add to that file is:
Code:
set tabstop=4

If you can't figure out which initialization file to use, you can always enter the command:
Code:
:set tabstop=4

any time you're in command mode during your editing session to set the tabstops being used for your current editing session.
# 12  
Old 03-21-2013
Forum,

So with all the replies I have found that my $HOME directory
is pointed at c:\documents and settings\owner and if I put
a copy of the _vimrc file there everything works. Now how
do I change the path to $HOME?

jerryd
# 13  
Old 03-21-2013
Why do you want to change the path to $HOME? I would advise not trying to change. Is there something not working at this point? If it's reading the _vimrc file, I might just be satisfied and leave well enough alone.

If you want the _vimrc file somewhere else, run the :version command and see the other possible places to locate the file. It will read whichever one it finds first. On my system, it gives three options:

Code:
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$VIM\_vimrc"

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Change size of watermark

I'm using this code to watermark images (add a logo). How do I change the size of the watermark to cover a certain percentage of the image ffmpeg -i folder/s886_01.jpg -i watermark.png -filter_complex overlay=15:15 output.png (2 Replies)
Discussion started by: locoroco
2 Replies

2. Ubuntu

How to change ffmpeg default font size?

Hello, I have a problem with Greek subtitle font size when I map a subtitle file into a video in ffmpeg. I ran below code: ffmpeg -i video.mp4 -sub_charenc CP1253 -i video_sub.srt -c:v copy -c:a copy \ -c:s mov_text -metadata:s:s:0 language=gr mapped_video.mp4 When I play it in VLC,... (2 Replies)
Discussion started by: baris35
2 Replies

3. Programming

Java JOptionPanel change text field with TAB

So I don't really know anything about Frames, Windows, or Panels.. I just got interested in Java because a coworker is doing classes in it. I know some other languages but never did GUI things...I literally just got NetBeans, and drew up a dialog using it's Design view. All I want is for the TAB... (0 Replies)
Discussion started by: neutronscott
0 Replies

4. Linux

kde 4.3 and tab size

Hi Guys I have just upgraded to kde4 and i noticed that the default tab size in konsole are massive, i cannot see the setting to change this any hlep thanks Adam (0 Replies)
Discussion started by: ab52
0 Replies

5. UNIX for Dummies Questions & Answers

How to get directories colored when doing change directory and tab

I am trying to navigate between directories using cd. However, the only way to distinguish directories now is by seeing the "/' after the directory names, which is quite inefficient. How can I make the directories look in color when typing cd and then using the tab key to list the files and... (1 Reply)
Discussion started by: genehunter
1 Replies

6. Shell Programming and Scripting

formatting tab with even size

I have a number of columns separated by tabs but the spacing between them are of different sizes. Is there any way of separating them with tab of even size? Thank you. (4 Replies)
Discussion started by: ivpz
4 Replies

7. AIX

Change the Block size of AIX 6.1

Friends , I know the most cases the unix operation system holds the default block size 4MB . In AIX 5.3 and AIX 6.1 , also use upto 4 MB as its default block size .Now I want to change this value from 4MB to 8MB as AIX block size . Is it possible to change the block size value in AIX 6.1/5.3... (2 Replies)
Discussion started by: shipon_97
2 Replies

8. Shell Programming and Scripting

change the font size in bash

Hi, I would like to change the font size in bash. I know how do it in ksh: F_VDOBLE="\033#6" print "${F_VDOBLE}Esto es..." But in bash I don't know Could you help me please? Many thanks! (5 Replies)
Discussion started by: mierdatuti
5 Replies

9. UNIX for Advanced & Expert Users

File system size change

Good morning folks! I'm new here.. trying to find an answer on how to resize filesystem. Need to add some space to c0t0d0s5, /var... Is it possible at all? JV (9 Replies)
Discussion started by: jvinn
9 Replies

10. UNIX for Dummies Questions & Answers

how to change the tab size in vi?

the default size is 8. i found it's too big. how can i change the tab size in vi? is it a good idea to change it at all? thks (12 Replies)
Discussion started by: gusla
12 Replies
Login or Register to Ask a Question