diff options
| author | Anton Bobov <abobov@gmail.com> | 2020-11-15 23:52:02 +0500 |
|---|---|---|
| committer | Anton Bobov <abobov@gmail.com> | 2020-11-15 23:52:02 +0500 |
| commit | 59725dfecdf3c0955983c11ff0822bf4bab9e0c5 (patch) | |
| tree | 379771f8e900cee1ce9e7d6163880785aea94783 | |
| parent | 6904b95867df01e160c5972ef7fbe81c06154003 (diff) | |
Vim: update templates, config.
| -rw-r--r-- | files/.vim/templates/=template=.py | 5 | ||||
| -rw-r--r-- | files/.vim/templates/=template=.sh | 2 | ||||
| -rw-r--r-- | files/.vimrc | 14 |
3 files changed, 12 insertions, 9 deletions
diff --git a/files/.vim/templates/=template=.py b/files/.vim/templates/=template=.py index f6f948d..1b23c83 100644 --- a/files/.vim/templates/=template=.py +++ b/files/.vim/templates/=template=.py @@ -1,8 +1,9 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 + def main(): %HERE% + if __name__ == '__main__': main() diff --git a/files/.vim/templates/=template=.sh b/files/.vim/templates/=template=.sh index 0774808..54e0dcf 100644 --- a/files/.vim/templates/=template=.sh +++ b/files/.vim/templates/=template=.sh @@ -1 +1,3 @@ #!/bin/sh
+
+set -e
diff --git a/files/.vimrc b/files/.vimrc index ddb4a54..251505d 100644 --- a/files/.vimrc +++ b/files/.vimrc @@ -313,14 +313,15 @@ if has('autocmd') au InsertEnter * set nocursorline au InsertLeave * set cursorline - " TODO перенести в ftplugin - autocmd FileType tex setlocal spell textwidth=79 - autocmd FileType java setlocal omnifunc=javacomplete#Complete - autocmd FileType python set expandtab - autocmd FileType html,xml,ant set nolist + " TODO перенести в ftplugin + au FileType tex setlocal spell textwidth=79 + au FileType java setlocal omnifunc=javacomplete#Complete + au FileType python set expandtab + au FileType html,xml,ant set nolist " Restore cursor position - au BufReadPost * if line("'\.") > 0 && line("'\.") <= line("$") | exe 'normal g`.zvzz' | endif + au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe 'normal g`"zvzz' | endif + au BufRead,BufNewFile /etc/nginx/* if &ft == "" | setfiletype nginx | endif au BufEnter * if &filetype == "" | setlocal ft=text | endif au BufReadPost *.ledger norm G @@ -328,7 +329,6 @@ if has('autocmd') au BufRead,BufNewFile *.geojson if &ft == "" | setfiletype json | endif " Set scripts to be executable from shell - "au BufWritePost * if getline(1) =~ "^#!.*/bin/" | silent !chmod +x <afile> | endif au BufWritePost * if getline(1) =~ "^#!.*/bin/" | silent exec "!chmod +x <afile>" | endif endif " }}} |
