:autocmd's execute ex-commands not normal mode commands. This means you can use :normal! or use :wincmd (method I prefer). Your new command: autocmd VimEnter * wincmd p Note: windcmd p is the same as <c-w>p/<c-w><c-p> in normal mode. For more help see: :h :wincmd :h :normal :h :au ...
Ok, so I found a solution myself: the key is to check whether or not the airline-plugin is already loaded when trying to set the airline colorscheme. Now it looks something like this: function! Sunset_daytime_callback() " This Works :) colorscheme vim_colorscheme_light if exists(':AirlineTheme') " check if the plugin is loaded...
vim,indentation,macvim,autocmd
The default settings for Python are: setlocal tabstop=8 setlocal softtabstop=4 setlocal shiftwidth=4 setlocal expandtab If you want to change, say… 'expandtab', you only have to put the line below in ~/.vim/after/ftplugin/python.vim: setlocal noexpandtab Yes, you are expected to do that for every filetype for which you don't like the default...
Your problem is that the autocommand option is only availaible in vim and not vi. So if this is available on your system, you should replace the last command line by : vim /export/home/fpd/tmp/tmp_local_log/LocalLog_IPNode$node.log Vim stands for "Vi Improved" and many options are only available in the latter. To be...
It would be useful to know what the exact error message is. On my machine, the error is: Error detected while processing BufWritePost Auto commands for "{*.java}": E488: Trailing characters: silent :JavaImportOrganize :syntax on I assume it's the same to you, but it would help a lot to paste it...
That's just fine and how I would implemented it, too. As you only hook into the FileType event, the toggling is only triggered when you :edit a new file, not when you recall an existing buffer with another filetype. You could do that with BufWinEnter, but it may cause too...
Here is a simpler version of your command: augroup AutoSourceVimrc autocmd! autocmd BufWritePost *vimrc execute "source " . expand("<afile>") augroup END ...
vim,syntax-highlighting,autocmd
The mentioned solution points to the right direction: Define an autocmd for all buffers, and then (instead of 'filetype'), match with the filename via expand('<afile>'): au BufNewFile,BufRead * if expand('<afile>:e') !=? 'inc' | syntax enable | endif Here, I've used your example of *.inc extensions in the condition. If you...