You are not logged in.
Hi all,
I want to run vim in a terminal (urxvt) session with XRESOURCES settings different than the default, located at ~/.Xresources.
I'm doing this because when I run vim I want different font settings as well as some other urxvt settings
How can I do this?
I have a second xresources file called .Xresources-vim
I tried setting the environment variable XRESOURCES=.Xresources-vim, and ran vim on the same line, but it doesn't pick up on the alternate urxvt settings.
If I change XRESOURCES as above and run urxvt on the same line, i get the custom settings
So I want to somehow execute vim with one key combination and get it into a urxvt session with the custom settings
any ideas?
Best,
Alan
Last edited by beitme (2013-09-05 04:08:45)
Offline
You can start urxvt with the requisite options (see the man page for details).
Offline
yes, but I want to start urxvt AND vim in ONE keystroke
I assume I need to write a script? But I'm not sure how.
Offline
Bind something like this to a key combination:
#!/usr/bin/env bash
urxvt -fn "xft:Bitstream Vera Sans Mono:pixelsize=18" --color2 '#CC0066' --color3 '#00FF99' -e vim "$@"
Offline
I got it!
it was the urxvt option "-e" which tells it to run a program inside the window
Okay, thanks!
I love linux and Arch!
Offline
Just so you know, the '-e' switch is common to most terminal emulators.
Offline
You can also just have a different class specifier in your Xresources file, so you'd have settings for URxvt*<option>: setting, and urxvt-vim.<option>: setting. Then call as "urxvt -name urxvt-vim -e vim" and it will take all the urxvt-vim settings from Xresources.
But if this is for different color settings, you do know that vim syntax highlighting can use 256 colors, right? So you wouldn't need to reset the 16 base colors.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline