On Tue, Jan 10, 2012 at 09:02, Chris Lott <[email protected]> wrote: > On Mon, Jan 9, 2012 at 7:42 PM, jz <[email protected]> wrote: >> I write shell scripts using vim. There is no issue to set my color >> scheme with .colorscheme in .vimrc when I edit .sh files. But how >> can I force vim to use color schema when I edit file without .sh >> extension? Shell function files are typically without .sh extension. > > You could use a modeline (see :help modeline) in your file, something like: > # vim: set ft=bash:
Most shell schripts start with a 'bang' line #!/bin/bash or whatever (could be any shell, perl... ). This bang line does activate the sh filetype without the need for a modeline. Kind regards, Guido -- Q: What's tiny and yellow and very, very, dangerous? A: A canary with the super-user password. http://vanhoecke.org ... and go2 places! -- 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
