如题,不想每次出来都用chmod。
先前在国外论坛找到的一个vimrc配置:
au BufWritePost * if getline(1) =~ "^#!" | if getline(1) =~ "/bin/" | silent !chmod +x <afile> | endif | endif
原理是判断是否有Shebang和路径中是否有bin, 你可以自己改进
如题,不想每次出来都用chmod。
先前在国外论坛找到的一个vimrc配置:
au BufWritePost * if getline(1) =~ "^#!" | if getline(1) =~ "/bin/" | silent !chmod +x <afile> | endif | endif
原理是判断是否有Shebang和路径中是否有bin, 你可以自己改进