Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
vim syntax highlighting for gentoo initscripts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
lamer
n00b
n00b


Joined: 16 May 2002
Posts: 16
Location: St. Paul, Mn

PostPosted: Wed May 29, 2002 4:34 pm    Post subject: vim syntax highlighting for gentoo initscripts Reply with quote

To get vim to set the syntax to sh style in vim you need to add the following to your ~/.vim/scripts.vim directory


Code:

if did_filetype()
      finish
endif

if getline(1) =~ '^#!/sbin/runscript'
     setfiletype sh
endif

mmmmm vim goodness. AFAIK this won't work unless it's in ~/.vim/scripts.vim as that's parsed after you open a file.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum