summaryrefslogtreecommitdiff
path: root/.vimrc
blob: 35db1fcd4d37397004a95c30d6cfae043d36eb5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
set nocompatible    " be iMproved, required
filetype on         " required

set timeoutlen=1000
set ttimeoutlen=5

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'VundleVim/Vundle.vim'

" Keep Plugin commands between vundle#begin/end.
" LSP
Plugin 'dense-analysis/ale'
" Utilities
Plugin 'preservim/nerdtree'
Plugin 'reedes/vim-pencil'
Plugin 'thaerkh/vim-workspace'
" Appearance
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" Music
Plugin 'azadkuh/vim-cmus'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

syntax on
set encoding=utf-8
set fileformat=unix
set number

set foldmethod=indent
set foldlevel=99

set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent

set background=dark
let g:airline_theme='onedark'

inoremap <C-s> <esc>:w<CR>i<right>

nnoremap <leader>f :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>

nnoremap <leader>s :ToggleWorkspace<CR>
let g:workspace_session_directory = $HOME . '/.vim/sessions/'
let g:workspace_session_disable_on_args = 1
let g:workspace_autosave = 0

nnoremap <leader>c :Cmus<CR>

nnoremap <leader>p :PencilToggle<CR>
let g:pencil#map#suspend_af = 'K'
let g:pencil#textwidth = 74
augroup pencil
    autocmd!
    autocmd FileType markdown,mkd call pencil#init()
    autocmd FileType text         call pencil#init()
augroup END

nnoremap <leader>a :ALEToggle<CR>