You are not logged in.
Pages: 1
So I have a perfect working ~/.gvimrc file, which sets all my prefered options and gets my editor of choice set up just right. I copy this to a ~/.vimrc so that in console mode I get the same effect, and for some reason my color scheme doesn't get applied. Any ideas why? All I added was the latex plugin for latex, set line numbering, and wrap on, and tried to set a color scheme. All .vim color schemes are in ~/.vim/colors/.
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2006 Nov 16
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" REQUIRED. This makes vim invoke latex-suite when you open a tex file.
filetype plugin on
" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash
" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse latex-suite. Set your grep
" program to alway generate a file-name.
set grepprg=grep\ -nH\ $*
" OPTIONAL: This enables automatic indentation as you type.
filetype indent on
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")
" Don't use Ex mode, use Q for formatting
map Q gq
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
" Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au!
" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
else
set autoindent " always set autoindenting on
endif " has("autocmd")
filetype plugin on
set grepprg=grep\ -nH\ $*
let g:tex_flavor = "latex"
colorscheme slate2
set nu
set lbr
Offline
You should try to put all configuration into .vimrc, than use .gvimrc for the GUI specific things (colo, guifont, etc.) - so you'll end up with a 3-4 line gvimrc.. That's how it works for me.
Offline
I usually have a .vimrc which checks if it is running gvim or not:
if has('gui_running')
do stuff
endif
then ln -s .vimrc .gvimrc
this way I have to handle only one file
Offline
IIRC vim and Gvim colour schemes do not translate to the same colours. That is, they are not an exact match. Gvim colour schemes are 256-colour (?) while vim colour schemes are limited to 16-colour by default (using the colours specified in ~/.Xdefaults). Not much help, I know. I don't spend enough time in Gvim to ever worry about it, but I think it's possible to set them up to match.
Last edited by thayer (2008-10-04 16:18:43)
thayer williams ~ cinderwick.ca
Offline
Maybe this can help: http://www.vim.org/script.php?script_id=39
Offline
Pages: 1