Skip to content

Commit

Permalink
Updated a listener to only listen when in a gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Kitt committed Oct 27, 2010
1 parent ad43bc2 commit d47a0ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions home/.vimrc
Expand Up @@ -208,8 +208,6 @@ au! BufWritePost .vimrc source %
" Set formatting on specific files
autocmd BufRead,BufNewFile *.md,*.markdown,*.mkd,*.txt setlocal wrap linebreak nolist spell

" Convert markdown to html on save
au! BufWritePost *.md,*.markdown,*.mkd :MDP

" Reload all snippets when creating new ones.
au! BufWritePost *.snippets call ReloadAllSnippets()
Expand All @@ -218,6 +216,12 @@ au! BufWritePost *.snippets call ReloadAllSnippets()
au BufRead,BufNewFile *.scss set filetype=scss
au BufNewFile,BufRead *.m*down set filetype=markdown

" GUI Specific settings
if has('gui_running')
" Convert markdown to html on save
au! BufWritePost *.md,*.markdown,*.mkd :MDP
endif

" Enable autosave
au FocusLost * :wa

0 comments on commit d47a0ae

Please sign in to comment.