Friday, August 26, 2011

Consuming 'filetype' stuff from .vimrc

I would like to know how how to adjust the width (set columns) in gvim
based on filetype that, I assume, Vim knows by reason of the file I've
launched it on. For example, if it's a Java file (.java), I'd like to
make it 120 columns wide, but leave it maybe 80 for all others. I
realize that I might mix the types of files that show up on the
command line, so I don't expect Vim to read my mind.

if has( "gui_running" )
   if _____filetype is Java_____
      set columns=120
   endif
endif

Is this covered behavior or even possible?

Please help me fill in the blank. Yes, I've read the filetype.txt help
document, but I'm a little obtuse and need a bit of a push to get
going.

Profuse thanks.

Russ Bateman

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment