LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Question for programmers who use Vi(m) (https://www.linuxquestions.org/questions/programming-9/question-for-programmers-who-use-vi-m-306076/)

lowpro2k3 03-25-2005 05:34 PM

Question for programmers who use Vi(m)
 
Do any of you work remotely on machines, possibly using putty on windows? I do all the time, and I find when I'm programming, I dont like one of the colors in Vi(m). Its the dark/bright blue color, usually used for comments.

I mainly SSH into a linux server or workstation from a windows workstation at school (through putty). I have an account that i use, and I'd like to automatically change that color in Vim when I log in. I cant read comments at all in code, I swear I have to squint to read them. I need my comments! :p

jtshaw 03-25-2005 06:02 PM

I know exactly what your going through:) It is hard to read that dark blue.

I have this dealing with syntax highlighting in my .vimrc file:

Code:

" some colors:  "white on black"
hi normal  ctermfg=white  ctermbg=black guifg=white  guibg=black
hi COMMENT ctermfg=cyan ctermbg=black
" Syntax Hilighting


lowpro2k3 03-25-2005 06:33 PM

hmm... I dont have my own .vimrc file in my /home/user directory, I assume theres like a global vimrc file on the server? If I write my own and stick it in my /home directory, will it override settings from the global one?

I knew I wasn't alone with this problem :cool:

jtshaw 03-25-2005 06:56 PM

There is usually a global file in /etc. Creating your own will override that file.

I personally don't use a lot of settings, my entire file looks like this:

Code:

set cindent
set shiftwidth=8
set tabstop=8
set expandtab
set ruler
syntax on
" some colors:  "white on black"
hi normal  ctermfg=white  ctermbg=black guifg=white  guibg=black
hi nontext  ctermfg=blue  ctermbg=black guifg=blue  guibg=black
hi COMMENT ctermfg=cyan ctermbg=black
" Syntax Hilighting
set nowrap

" enables real tabs for Makefiles only
augroup Makefile
au!
au BufReadPre Makefile set noexpandtab
augroup END

" vim -b : edit binary using xxd-format!
augroup Binary
au!
au BufReadPre  *.bin let &bin=1
au BufReadPost *.bin if &bin | %!xxd
au BufReadPost *.bin set ft=xxd | endif
au BufWritePre *.bin if &bin | %!xxd -r
au BufWritePre *.bin endif
au BufWritePost *.bin if &bin | %!xxd
au BufWritePost *.bin set nomod | endif
augroup END

If you are going to do any tab expansion you must make sure you turn it off for Makefiles or make will puke.


All times are GMT -5. The time now is 03:22 PM.