summaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/.config/vim/after/ftplugin/cpp.vim5
-rw-r--r--vim/.config/vim/ftdetect/cls.vim1
-rw-r--r--vim/.config/vim/ftplugin/c.vim8
-rw-r--r--vim/.config/vim/ftplugin/html.vim3
-rw-r--r--vim/.config/vim/ftplugin/javascript.vim3
-rw-r--r--vim/.config/vim/ftplugin/mail.vim2
-rw-r--r--vim/.config/vim/ftplugin/php.vim3
-rw-r--r--vim/.config/vim/ftplugin/tex.vim5
-rw-r--r--vim/.config/vim/ftplugin/yaml.vim3
-rw-r--r--vim/.vimrc45
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()