You are not logged in.
The first issue isn't really a vim problem, but it's related. When running Vim in a terminal, my meta key bindings don't work. I've tracked it down to a problem with Xfce's Terminal as noted here: http://vimdoc.sourceforge.net/htmldoc/m … p-alt-keys
...but I'm not sure exactly how to fix it. I suppose I could always switch to another terminal, but I'd like to stick with Xfce's version if possible.
The second issue is that my color scheme isn't being set when I first load up gVim. As soon as I open a file, it properly displays, but the "splash" page doesn't show it. I'm using desert (who doesn't) and this is what it looks like when I first load up gVim:
I did stop using a separate <code>.gvimrc</code> in favor of putting everything in my <code>.vimrc</code> file under a conditional, and all the other settings work just fine. Here's what that conditional looks like:
if has( "gui_running" )
set columns=84 " Set the window's width
set lines=43 " Set the window's height
set guioptions-=T " Remove the toolbar from the window
set guifont=Terminus 12 " Use a clean monospaced font
colorscheme desert
else
set background=dark
colorscheme desert
endif
In case you're curious, here's my entire <code>.vimrc</code> file.
Offline
IIRC this happens for because gvim does not find a ~/.gvimrc and reads /etc/gvimrc after ~/.vimrc (I think).
Try symlinking ~/.vimrc to ~/.gvimrc
Offline
or create a ~/.gvimrc with a "so ~/.vimrc" on it
Offline
As for the meta bindings, you can't bind them the same as a GUI. Terminal meta characters are actually 2 characters... Alt-A will translate to <ESC>A.
You need something like:
if has('gui_running')
map <M> foo
else
map ^[A foo
endif
NOTE: That ^[ is a literal esc character (C-v, C-[).
Offline
Thanks for the info...how did I know that phrak would be all over this topic . I might try using xterm or aterm on my desktop, but I guess that won't really solve the issue if I'm SSHing in to the machine. Perhaps I'll just change those mappings. Hmmm...
Offline
IIRC this happens for because gvim does not find a ~/.gvimrc and reads /etc/gvimrc after ~/.vimrc (I think).
Try symlinking ~/.vimrc to ~/.gvimrc
That solved the problem for me. Thanks
There are a lot of lies going around.... and half of them are true.
-- Winston Churchill
Offline