You are not logged in.
hello,
is there a way to control background and syntax highlighting when running vim in a terminal like urxvt?
i've been thinking of leaving gvim behind and just run vim in urxvt(or without x at all) instead,
arch + gentoo + initng + python = enlisy
Offline
you may want to have a look what ~/.Xdefaults can do for you.
I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell
Offline
hello,
is there a way to control background and syntax highlighting when running vim in a terminal like urxvt?
are you lookin' for somethin' like
:colorscheme desert
from last line mode, or something more specific?
**************EDIT********************
:highlight <MODE> ctermfg=<COLOR> ctermbg=<COLOR>
might help, where MODE is NORMAL,VIUSAL etc and COLOR are predefined termcolors
-neri
Offline
About syntax:
syntax on
In ~/.vimrc it's enough.
Arch GNU/Linux 0.7.1 (Noodle)
Linux 2.6.14-archck1
Offline
a good deal of coloration is achieved by adding things to .vimrc
is that what you mean?
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
vimrc:
set nocompatible
behave xterm
syntax on
set bs=2
set ts=3
set sw=3
set tw=78
set et
set nu
set nowrap
set history=50
set ruler
set rulerformat=%55(%{strftime('%e-%b-%Y %I:%M %p')} [%5l,%-6(%c%V%)] %P%)
set incsearch
set autoindent
set hlsearch
set ww=<,>,[,]
if has("autocmd")
filetype plugin indent on
augroup vimrcFunctions
au!
autocmd FileType text setlocal textwidth=78
autocmd BufReadPost * if line("'"")>0 && line("'"")<=line("$")|exe "normal g`""|endif
autocmd Syntax * syn match Error /s+$| +zet/
augroup END
endif
colorscheme desert
try that!
Offline
wow, this was fast answers,
who ever said arch community was slow,
":colorscheme" was the command i was looking for and if i understand correctly background must be set the old way in .Xdefaults
that desert scheme looks really good with a dark background, i'm using koehler in gvim otherwise,
arch + gentoo + initng + python = enlisy
Offline
vimrc:
colorscheme desert
try that!
*grin* everybody loves desert, I think ten out of eleven people on the Archlinux booth used that
-neri
Offline
Even I used to use desert!
now im using Metacosm.
Offline
Nice vimrc phrakture thanxs, mine was a little "minimalistic" ,
Arch GNU/Linux 0.7.1 (Noodle)
Linux 2.6.14-archck1
Offline
Mind if i ask.....
terminal, mlterm etc, when I run vim in them, they dont load up my colour scheme, they seem like they are restricted to the 16 colours the terminal is capable of displaying.
This is kinda crazy, I'm in X, it should be able to display more than 16 colours in a terminal, is there a way around this so that my vim colours appear correct?
iphitus
Offline
@iphitus
i've the same problem, my investigations tell me that there are some differences between console and gui colorschemes, i think i write my own scheme...
arch + gentoo + initng + python = enlisy
Offline
ok, i'm pretty comfortable now running vim in a terminal,
i wrote my own syntaxhighlighting theme so it looks bloody good now,
here is my .vimrc if anyone is interested:
set nocompatible " We're running Vim, not Vi!
filetype on " Enable fieltype detection
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins
"searching related"
"set ignorecase "Ignore case in searches --opposite is: set noic
"sset incsearch "highlight word while searching
"set nohls "does not highlight searches
"set smartcase "unless they contain upper-case letters
"indexting related"
"set noexpandtab "Don't want tabs replaced with spaces
set expandtab
set ts=2 "tab stop
set softtabstop=2 "use the same value as shiftwidth
set shiftwidth=2 "use 4 spaces when using autoindent/cindent
"set smarttab "smart tabs??
set autoindent "Autoindentation
set smartindent
"set nosi "turn off smart indenting
set whichwrap=<,>,[,]
set nowrap "do not wrap lines
set bs=2 "allow backspacing of lines
"set statusline=%F%m%r%h%w [FORMAT=%{&ff}] [POS=%04l,%04v][%p%%] [LEN=%L]
"set laststatus=2
set ruler
set rulerformat=%80(%F%m%r%h%w [%5l,%-6(%c%V%)] [LEN=%L] %P%)
"display"
set title "Put title in title bar
syntax on "Enable syntax highlighting
"et showmatch "show matching parenthesis,brackets,etc
set showcmd "show current uncompleted command
set showmode "show current mod (ie insert or not)
set ttyfast "Smoother changes
set scrolloff=5 "save 5 lines for scope
"set cmdheight=2
"misc"
"set noerrorbells "no beeps
"set visualbell "visual bell instead of beeping
set nobackup "no backup copies..
set nomodeline "don't have files trying to override this .vimrc
set nostartofline "don't jump cursor around, stay in current column
set backspace=2 " Allow backspace to back over lines
set shell=bash
"set number "show line numbers
"set background=dark
"colorscheme xerxes
arch + gentoo + initng + python = enlisy
Offline
aye, my vim in terminal is just as functional as the GUI one, even mouse scroll wheel and proper selecting works!!
iphitus
Offline
here is my .vimrc if anyone is interested:...snip...
one thing I cannot live without, is:
set ww=<,>,[,]
(ww=whichwrap) which allows left and right movements to go up and down lines (i.e. left at the beginning of a line goes to end of previous line, and vice versa)
Offline
hey, thanks phrakture,
that thing has been a real pita, i didn't know that you could fix it like that,
arch + gentoo + initng + python = enlisy
Offline
Offline
heh, vim can do everything!
pull me a beer
-neri
Offline
phrakture wrote:heh, vim can do everything!
pull me a beer
-neri
vim -c 'r!cowsay beer'
Offline
http://benny.klapmuetz.org/lt05/p1010072.jpg
no more beers for you guys until next linuxtag,
arch + gentoo + initng + python = enlisy
Offline
Mind if i ask.....
terminal, mlterm etc, when I run vim in them, they dont load up my colour scheme, they seem like they are restricted to the 16 colours the terminal is capable of displaying.
This is kinda crazy, I'm in X, it should be able to display more than 16 colours in a terminal, is there a way around this so that my vim colours appear correct?
iphitus
So were you able to get the console version of vim to display colors correctly? I'm on Xfce using Terminal, and turning syntax on doesn't do much aside from making some lines bold...
Offline
So were you able to get the console version of vim to display colors correctly? I'm on Xfce using Terminal, and turning syntax on doesn't do much aside from making some lines bold...
you need to set your TERM variable properly - vim checks the TERM variable to see what colors your terminal supports when rendering...
try running
TERM="xterm-color" vim
Offline
Thanks...that did it! Now I'll just have to adjust the colors
Offline
here's mine for urxvt:
http://phraktured.net/.Xdefaults
the colors are going to depend on your terminal itself... oh, and use "colorscheme desert", heh - everyone loves desert
Offline
i love you phrakture!!!
i just bought a new hdd(samsung ultraquiet 200gb) and did a fresh archinstall, copied over my old homedir and everything worked except for this term stuff,
i was just about to post a thread when i saw this,
arch + gentoo + initng + python = enlisy
Offline