summaryrefslogtreecommitdiff
path: root/.vim
diff options
context:
space:
mode:
authorcafebabe <77344710+yuzu-eva@users.noreply.github.com>2022-05-20 11:51:33 +0200
committercafebabe <77344710+yuzu-eva@users.noreply.github.com>2022-05-20 11:51:33 +0200
commit824e1aae16383dc8a6afec04de0958f3c9289e94 (patch)
treed3c60f85e8bd5cc5c594d6f7cdc5f470a4197bb1 /.vim
parent61fbd782ec5ba665ef82f7974052bb8b6e83cd4a (diff)
Add my vimrc
Diffstat (limited to '.vim')
-rw-r--r--.vim/vimrc147
1 files changed, 147 insertions, 0 deletions
diff --git a/.vim/vimrc b/.vim/vimrc
new file mode 100644
index 0000000..d241ab6
--- /dev/null
+++ b/.vim/vimrc
@@ -0,0 +1,147 @@
+" __ _ _
+" ___ __ _ / _| ___ | |__ __ _| |__ ___
+" / __| / _' | |_ / _ \| _ \ / _' | _ \ / _ \
+" | |__ / (_| | _| __/| |_) / (_| | |_) | __/
+" \___|\___._|_| \___||____/\___._|____/ \___/
+"
+" Filename: vimrc
+
+" General Settings {{{{{{
+
+filetype plugin indent on
+syntax enable
+set nocompatible
+set modeline
+set modelines=5
+set nobackup
+set nowritebackup
+set updatetime=300
+set hidden
+set noswapfile
+set laststatus=2
+set shortmess+=c
+
+let g:markdown_fenced_languages = ['javascript', 'js=javascript', 'json=javascript']
+
+let $RTP=split(&runtimepath, ',')[0]
+let $RC="$HOME/.vim/vimrc"
+
+" }}}}}}
+
+" Plugins {{{
+
+call plug#begin('~/.vim/plugged')
+
+source ~/.config/vim/plugins/ale.vim
+source ~/.config/vim/plugins/coc.vim
+source ~/.config/vim/plugins/commentary.vim
+source ~/.config/vim/plugins/dirvish.vim
+source ~/.config/vim/plugins/gitbranch.vim
+source ~/.config/vim/plugins/javascript.vim
+source ~/.config/vim/plugins/lightline.vim
+source ~/.config/vim/plugins/maximizer.vim
+source ~/.config/vim/plugins/onedark.vim
+source ~/.config/vim/plugins/polyglot.vim
+
+call plug#end()
+
+
+" }}}
+
+" Colors {{{
+
+if (has("termguicolors"))
+ set termguicolors
+endif
+
+" joshdick/onedark.vim
+colorscheme onedark
+
+" }}}
+
+" Tabs and Spaces {{{
+
+set autoindent
+set smartindent
+set expandtab
+set tabstop=4
+set shiftwidth=4
+
+" }}}
+
+" File Find {{{
+
+" Search down into subfolders
+set path+=~/Scripts/**,~/Documents/**
+set wildmenu
+
+" }}}
+
+" UI {{{
+
+set number
+set relativenumber
+set cursorline
+set showcmd
+set cmdheight=1
+set completeopt=menuone,noinsert,noselect
+set splitright
+set splitbelow
+set ignorecase
+set smartcase
+set showmatch
+set signcolumn=yes
+set incsearch
+set diffopt+=vertical
+set foldenable
+set foldlevelstart=10
+set foldnestmax=10
+set foldmethod=marker
+
+" }}}
+
+" Commands {{{
+
+" Use ^] to jump to tag under cursor
+" Use g^] for ambiguous tags
+" Use ^t to jump back up the tag stack
+command! MakeTags !ctags -R *
+
+" }}}
+
+" Keybindings {{{
+
+let mapleader="\<space>"
+
+" Quick navigation between splits
+nmap <silent> <c-h> <c-w>h
+nmap <silent> <c-j> <c-w>j
+nmap <silent> <c-k> <c-w>k
+nmap <silent> <c-l> <c-w>l
+
+" Delete all buffers
+nmap <leader>Q :bufdo bdelete<CR>
+
+nmap <leader>ve :edit $MYVIMRC<CR>
+nmap <leader>vr :source $MYVIMRC <bar> :doautocmd BufRead<CR>
+
+nnoremap <leader>m :MaximizerToggle!<CR>
+nnoremap <leader>F :ALEFix<CR>
+nnoremap <leader>d :cd %:p:h<CR>:pwd<CR>
+
+" Copy & Paste with system-clipboard
+vnoremap <c-c> "+y
+nnoremap <c-v> "+p
+
+" Quickly escape to normal mode
+imap jj <Esc>
+
+" Allow gf to open non-existent files
+map gf :edit <cfile><CR>
+
+" Open the current file in the default program
+nmap <leader>x :!xdg-open %<CR><CR>
+
+" }}}
+
+" vim:foldlevel=0