diff options
author | Robin Krahl <me@robin-krahl.de> | 2018-02-22 23:09:45 +0100 |
---|---|---|
committer | Robin Krahl <me@robin-krahl.de> | 2018-02-22 23:09:45 +0100 |
commit | 548a4425c43528d1a65d5912fa73390bcf519dee (patch) | |
tree | f5471ed6eb7599a0e518b9b12cc7ac679f2fe776 /vim | |
parent | 63c61ba63a9dab45d0a0d5223c1fedfd92b1f085 (diff) | |
download | dotfiles-548a4425c43528d1a65d5912fa73390bcf519dee.tar.gz dotfiles-548a4425c43528d1a65d5912fa73390bcf519dee.tar.bz2 |
Restructure for compatibility with GNU stow
Diffstat (limited to 'vim')
-rw-r--r-- | vim/.config/vim/after/ftplugin/cpp.vim | 5 | ||||
-rw-r--r-- | vim/.config/vim/ftdetect/cls.vim | 1 | ||||
-rw-r--r-- | vim/.config/vim/ftplugin/c.vim | 8 | ||||
-rw-r--r-- | vim/.config/vim/ftplugin/html.vim | 3 | ||||
-rw-r--r-- | vim/.config/vim/ftplugin/javascript.vim | 3 | ||||
-rw-r--r-- | vim/.config/vim/ftplugin/mail.vim | 2 | ||||
-rw-r--r-- | vim/.config/vim/ftplugin/php.vim | 3 | ||||
-rw-r--r-- | vim/.config/vim/ftplugin/tex.vim | 5 | ||||
-rw-r--r-- | vim/.config/vim/ftplugin/yaml.vim | 3 | ||||
-rw-r--r-- | vim/.vimrc | 45 |
10 files changed, 78 insertions, 0 deletions
diff --git a/vim/.config/vim/after/ftplugin/cpp.vim b/vim/.config/vim/after/ftplugin/cpp.vim new file mode 100644 index 0000000..87152c2 --- /dev/null +++ b/vim/.config/vim/after/ftplugin/cpp.vim @@ -0,0 +1,5 @@ +setlocal expandtab +setlocal shiftwidth=2 +setlocal softtabstop=2 + +setlocal cino=N-s diff --git a/vim/.config/vim/ftdetect/cls.vim b/vim/.config/vim/ftdetect/cls.vim new file mode 100644 index 0000000..1a23087 --- /dev/null +++ b/vim/.config/vim/ftdetect/cls.vim @@ -0,0 +1 @@ +au BufNewFile,BufRead *.cls set filetype=tex diff --git a/vim/.config/vim/ftplugin/c.vim b/vim/.config/vim/ftplugin/c.vim new file mode 100644 index 0000000..beaaf90 --- /dev/null +++ b/vim/.config/vim/ftplugin/c.vim @@ -0,0 +1,8 @@ +setlocal tabstop=8 +setlocal softtabstop=8 +setlocal shiftwidth=8 +setlocal noexpandtab + +setlocal cino=:0 + +setlocal colorcolumn=80 diff --git a/vim/.config/vim/ftplugin/html.vim b/vim/.config/vim/ftplugin/html.vim new file mode 100644 index 0000000..765e06c --- /dev/null +++ b/vim/.config/vim/ftplugin/html.vim @@ -0,0 +1,3 @@ +setlocal expandtab +setlocal shiftwidth=4 +setlocal softtabstop=4 diff --git a/vim/.config/vim/ftplugin/javascript.vim b/vim/.config/vim/ftplugin/javascript.vim new file mode 100644 index 0000000..765e06c --- /dev/null +++ b/vim/.config/vim/ftplugin/javascript.vim @@ -0,0 +1,3 @@ +setlocal expandtab +setlocal shiftwidth=4 +setlocal softtabstop=4 diff --git a/vim/.config/vim/ftplugin/mail.vim b/vim/.config/vim/ftplugin/mail.vim new file mode 100644 index 0000000..0915315 --- /dev/null +++ b/vim/.config/vim/ftplugin/mail.vim @@ -0,0 +1,2 @@ +setlocal noexpandtab +setlocal wrap diff --git a/vim/.config/vim/ftplugin/php.vim b/vim/.config/vim/ftplugin/php.vim new file mode 100644 index 0000000..00a6a64 --- /dev/null +++ b/vim/.config/vim/ftplugin/php.vim @@ -0,0 +1,3 @@ +set expandtab +set shiftwidth=2 +set softtabstop=2 diff --git a/vim/.config/vim/ftplugin/tex.vim b/vim/.config/vim/ftplugin/tex.vim new file mode 100644 index 0000000..40e8bf7 --- /dev/null +++ b/vim/.config/vim/ftplugin/tex.vim @@ -0,0 +1,5 @@ +setlocal tabstop=2 +setlocal shiftwidth=2 +setlocal expandtab + +setlocal colorcolumn=80 diff --git a/vim/.config/vim/ftplugin/yaml.vim b/vim/.config/vim/ftplugin/yaml.vim new file mode 100644 index 0000000..51f2b56 --- /dev/null +++ b/vim/.config/vim/ftplugin/yaml.vim @@ -0,0 +1,3 @@ +setlocal expandtab +setlocal shiftwidth=2 +setlocal softtabstop=2 diff --git a/vim/.vimrc b/vim/.vimrc new file mode 100644 index 0000000..c760f86 --- /dev/null +++ b/vim/.vimrc @@ -0,0 +1,45 @@ +" Disable Vi-compatibility +set nocompatible + +" Set paths according to XDG Base Directory specification +set viminfo+=n${XDG_CACHE_HOME}/vim/viminfo +set runtimepath=${XDG_CONFIG_HOME}/vim,$VIM,$VIMRUNTIME,${XDG_CONFIG_HOME}/vim/after +let g:netrw_home = "${XDG_CACHE_HOME}/vim" + +" Syntax highlighting +syntax on + +" Enable the filetype plugin +filetype plugin indent on +" LaTeX instead of Plain TeX +let g:tex_flavor = "latex" + +" Status line and numbers +set laststatus=2 +set number +set relativenumber +set ruler + +" Splits +set splitbelow +set splitright + +" Colors +set background=dark + +" Ignore some additional patterns when opening files +set wildignore+=*.o,*.so,*.swp,*/__pycache__/* + +" Search subdirectories with :find & co +set path+=** + +" Better completion +set wildmenu +set wildmode=longest:full,full + +" netrw +let g:netrw_banner=0 +" let g:netrw_browse_split=4 +let g:netrw_altv=1 +let g:netrw_liststyle=3 +let g:netrw_list_hide=netrw_gitignore#Hide() |