Who else here religiously uses VI[M] in your favorite Linux environment? I'm curious to see what's in everyone's .vimrc; here's mine:


Code:
set background=dark
set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab
I screwed up my vim settings a while ago... Razz Lemme post it when I get on my linux box.
Mapar007 wrote:
I screwed up my vim settings a while ago... Razz Lemme post it when I get on my linux box.
Good deal. I'm glad at least one other person uses vim. Razz
I'm usually an emacs or nano guy.
foamy3 wrote:
I'm usually an emacs or nano guy.
Emacs, really? What do you see in such a bloated editor? Is it that you started with Emacs and stuck with what you knew, or started with vi[m], didn't like it, and switched to emacs?
Pico is far superior.
I spent some time souping mine up this morning, actually.. (was that Kerm's motivation for creating this topic?)


Code:
" Tari's .vimrc
" If misconfiguration breaks vim, invoking as below will allow recovery:
" vim -N -u NONE -U NONE

" More history, drop vi compatibility...
set nocompatible
set ruler
set hidden
set history=200
set scrolloff=4

" Make everything UTF-8
if has("multi_byte_encoding")
    set encoding=utf-8
endif

" Indent intelligently, replace <Tab> with ' '*4
set autoindent smartindent
set tabstop=4 shiftwidth=4 expandtab

" Note matching braces/whatever when closing
set showmatch

" Enable smart completion on supported langs
" (C-x C-o)
filetype plugin on
set ofu=syntaxcomplete#Complete

" Include generated system ctags for completion in C
" (ctags -R -f ~/.vim/systags /usr/include /usr/local/include)
" That file is probably huge, mind... (>700 MB here on Nero)
if filereadable(expand("$HOME/.vim/systags"))
    set tags+=~/.vim/systags
else
    echo "Systags not found"
endif

" Turn on lexical highlighting
syntax on

" Make comments (much) easier to read
hi Comment ctermfg=6
" TBD: throwing in a cterm=bold there might be nice

" Set window titles for the benefit of screen and friends
set title
set titlestring=%t%(\ %M%)%(\ (%(expand(\"%:P:H\")))%)%(\ %a%)\ -\ %(V:servername)
KermMartian wrote:
foamy3 wrote:
I'm usually an emacs or nano guy.
Emacs, really? What do you see in such a bloated editor? Is it that you started with Emacs and stuck with what you knew, or started with vi[m], didn't like it, and switched to emacs?


I started with emacs and never really saw anything in vim making it worth switching. I used to always secure shell into the lab computers while I was at work so I could work on assignments. I've never really tried running it locally much, so even if it really is that bloated, I've never noticed a performance issue.
Foamy, fair enough, I guess there's no reason to switch if you don't have any problems with it.

Tari, actually, it was just spurred by me fixing some indents and realizing it defaulted to two tabs per indent. I was curious to see if anyone had a very complex .vimrc, and I was happily rewarded. I stole your title line, btw. Smile
I've personally been using nano and medit for most of my *nix editing. I keep meaning to get into vim but I just haven't been doing enough coding to do so.
I picked up vim early on, and still use it whenever I need to edit text quickly when I'm doing a lot of stuff in the terminal. Most of the rest of the time I just use a graphical editor. I don't do much customization of it though, since that's a recipe for frustration when I use other computers.
elfprince13 wrote:
I picked up vim early on, and still use it whenever I need to edit text quickly when I'm doing a lot of stuff in the terminal. Most of the rest of the time I just use a graphical editor. I don't do much customization of it though, since that's a recipe for frustration when I use other computers.
I suppose, but I don't want to have to type :set background=dark every time I start up vim, even on a strange computer. Smile
I can't remember the last time I used a computer that had the terminal set up for a light background, so I haven't really run into it....
elfprince13 wrote:
I can't remember the last time I used a computer that had the terminal set up for a light background, so I haven't really run into it....
Sadly xterm defaults to a white background so when I x-forward I have to deal with that, but yeah the black background is fairly standard.
Why would you x-forward to run xterm instead of using the terminal from ssh? O_o
elfprince13 wrote:
Why would you x-forward to run xterm instead of using the terminal from ssh? O_o
My problems usually stem from vim in a bunch of different SSH sessions on different machines from inside one screen session on my main external machine. It seems screen reports a light background even if it's actually showing black (or something).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement