You are not logged in.

#1 2013-09-05 03:37:41

beitme
Member
Registered: 2013-05-24
Posts: 52

[SOLVED] custom terminal (urxvt) settings with vim

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

#2 2013-09-05 03:44:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] custom terminal (urxvt) settings with vim

You can start urxvt with the requisite options (see the man page for details).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-09-05 04:01:26

beitme
Member
Registered: 2013-05-24
Posts: 52

Re: [SOLVED] custom terminal (urxvt) settings with vim

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

#4 2013-09-05 04:04:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] custom terminal (urxvt) settings with vim

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 "$@"

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-09-05 04:07:04

beitme
Member
Registered: 2013-05-24
Posts: 52

Re: [SOLVED] custom terminal (urxvt) settings with vim

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

#6 2013-09-05 04:37:15

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] custom terminal (urxvt) settings with vim

Just so you know, the '-e' switch is common to most terminal emulators.

Offline

#7 2013-09-05 11:09:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,230
Website

Re: [SOLVED] custom terminal (urxvt) settings with vim

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

Board footer

Powered by FluxBB