Created
May 18, 2012 10:36
-
-
Save Stubbs/2724564 to your computer and use it in GitHub Desktop.
Dirty hack for Macvim when it hangs trying to add new lines to files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" DIRTY! | |
" For some reason, Macvim hangs when trying to insert a new line when editing | |
" mysql & javascript file. | |
" | |
" You can work around that by switching to another filetype that doesn't have | |
" the problem, then back again, hence these two hacks. | |
" | |
augroup mysqlhack | |
au! | |
au BufNewFile,BufRead *.sql,*.mysql,*.ddl set ft=php ft=mysql | |
augroup END | |
augroup jshack | |
au! | |
au BufNewFile,BufRead *.js set ft=php ft=javascript | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I run dtruss on the process, I get this endlessly:
gettimeofday(0xC0093258, 0x0, 0x1000) = 1337337987 0
gettimeofday(0xC0093258, 0x0, 0x1000) = 1337337987 0
gettimeofday(0xC0093258, 0x0, 0x1000) = 1337337987 0
gettimeofday(0xC0093258, 0x0, 0x1000) = 1337337987 0
gettimeofday(0xC0093258, 0x0, 0x1000) = 1337337987 0
gettimeofday(0xC0093258, 0x0, 0x1000) = 1337337987 0
gettimeofday(0xC0093258, 0x0, 0x1000) = 1337337987 0
gettimeofday(0xC0093258, 0x0, 0x1000) = 1337337988 0