TheManaDrain.com
February 16, 2026, 02:23:59 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Linux Vim Colour Highlightning for .dec files  (Read 1324 times)
Lamex
Basic User
**
Posts: 3

124680323 lamex@host.sk lamexx Lamex_C
View Profile Email
« on: January 14, 2005, 10:46:30 pm »

Heya all, I thought I might post this on a couple of forums, Its something small that I created what a few linux users might like.

Keep in mind that this is for Linux/Unix Users only!

As the most Linux users know, there NO deckbuilder for in linux and I got sick of it of writing it down in vim everytime without some colours to devide the comments from the numbers from the names for example. So I did a little bit of digging in the possibilties of Vim, and I had found a way very fast.

Anyway, without further delay here are some screenshots:

http://sacredhill.game-host.org/Other/Screens/dec_vim.png

http://sacredhill.game-host.org/Other/Screens/dlist.png

As you can see with the second screenshot I also created a syntax highlight for *.dlist files so that I could clearly see what I need and how many and as wel howmuch I want and have already Smile

As for installing this it is pretty easy:

1) make a .vimrc file in your home directory if you don't have it already and add the following lines:

Code:
syntax on

au BufRead,BufNewFile *.dec set filetype=deck
au BufRead,BufNewFile *.dlist set filetype=deck


or could just get my file which also contain these lines: http://sacredhill.game-host.org/Other/Scripts/vimrc

Then execute these commands:
mkdir ~/.vim
mkdir ~/.vim/syntax

then go into that directory (cd ~/.vim/syntax/ ) and get this file http://sacredhill.game-host.org/Other/Scripts/deck.vim and put it into that directory (either download or use the wget commando)

And you are done Smile

Close any open vim windows that you have to make the changes effective. Now open a .dec file or create one in a new vim window and try it out I would say.

Its actually a small script but here is what it recognizes:

- Comments that start with "//"
- Numbers
- Sideboard tags "SB:"
- the special tags: "hv:" "nd:" and "wn:"

All of this will be recognized in both .dec and .dlist files.

This script is free for download or modification
When you modify this file and want to distribute it you must have my approval

You can contact me by email: Lamex@sacredhill.game-host.org

Comments and feedback/suggestions are also welcome, I prefer email since I have it most time to busy to visit this forum and the other ones where I post this topic.

Greetz, Thijs "Lamex" Leibbrand
Logged
orgcandman
Full Members
Basic User
***
Posts: 552


Providence protects children and idiots

orgcandman
View Profile WWW
« Reply #1 on: January 17, 2005, 11:52:31 am »

Quote from: Lamex
...

As the most Linux users know, there NO deckbuilder for in linux and I got sick of it of writing it down in vim everytime without some colours to devide the comments from the numbers from the names for example. So I did a little bit of digging in the possibilties of Vim, and I had found a way very fast.

...


This is untrue. Please investigate Mindless Automation. Very Happy

Aaron
Logged

Ball and Chain
Quote from: jdizzle
Congrats to the winners, but as we all know, everyone who went to this tournament was a winner
Quote from: iamfishman
Just to clarify...people name Aaron are amazing
Lamex
Basic User
**
Posts: 3

124680323 lamex@host.sk lamexx Lamex_C
View Profile Email
« Reply #2 on: January 17, 2005, 12:03:11 pm »

Quote from: orgcandman
Quote from: Lamex
...

As the most Linux users know, there NO deckbuilder for in linux and I got sick of it of writing it down in vim everytime without some colours to devide the comments from the numbers from the names for example. So I did a little bit of digging in the possibilties of Vim, and I had found a way very fast.

...


This is untrue. Please investigate Mindless Automation. Very Happy

Aaron


I have that program, so I know what I'm talking about, Mindless Automation is only a program to play online, you can load a deck to play with, but not build one with it or edit it, and I have the latest version.

It may be a program like the apprentice for windows, it is not the same, another example of a difference between the 2 is that apprentice does not load card pictures from the wizards site while mindless does do that.. Smile
Logged
moonkhan
Basic User
**
Posts: 14



View Profile Email
« Reply #3 on: January 17, 2005, 12:16:37 pm »

@Lamex: Thanks so much for posting this .vim color file. I didn't know about Mindless Automaton until now so I'm totally going to get that working this afternoon!

Is there someone out there that has Magic Workstation working on Linux? I've tried Wine, WineX by Transgaming (Cedega), and CrossOver Office and none of them work ...

--Paul
Logged
Lamex
Basic User
**
Posts: 3

124680323 lamex@host.sk lamexx Lamex_C
View Profile Email
« Reply #4 on: January 17, 2005, 12:30:58 pm »

I really wouldn't count on it, MWS uses some graphics engine parts that are made for windows only, there is no way magic workstation will work on Linux, nor will they make it for linux, that will perhaps happen over like 5 years or something, but till then I would just stick with mindless... you can play with people that have apprentice on windows without any problems, and with people that have mindless of course on linux Smile

@moonkhan, did the installation that I posted worked flawlessly? I was not able to test it completely myself to be honest... So I would like to know if it worked, thanx in advance Smile
Logged
moonkhan
Basic User
**
Posts: 14



View Profile Email
« Reply #5 on: January 17, 2005, 12:45:06 pm »

@Lamex: Yeah your installation worked great. I already had an augroup so my install looked slightly different:

Code:
augroup filetype
        au!
        au! BufRead,BufNewFile *.dec    set filetype=deck
        au! BufRead,BufNewFile *.dlist  set filetype=deck
augroup END


I made the above lines work in my .vimrc and dropped your deck.vim syntax file into ~/.vim/syntax/ and it worked right away. Thanks again!

--Paul
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.035 seconds with 19 queries.