blob: 5ef184b0b25dab6e57c7f558602c7ef29298413f (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
" Disable compatibility with vi which can cause unexpected issues.
set nocompatible
" Enable type file detection. Vim will be able to try to detect the type of file in use.
filetype on
" Enable plugins and load plugin for the detected file type.
filetype plugin on
" Load an indent file for the detected file type.
filetype indent on
" Turn syntax highlighting on.
syntax on
" Highlight cursor line underneath the cursor horizontally.
set cursorline
" Add numbers to each line on the left-hand side.
set number
" Use spaces instead of tabs
set expandtab
" Be smart when using tabs ;)
set smarttab
" Set shift width to 4 spaces.
set shiftwidth=4
" Set tab width to 4 columns.
set tabstop=4
" Do not save backup files.
set nobackup
" Do not wrap lines. Allow long lines to extend as far as the line goes.
set nowrap
" Do not let cursor scroll below or above N number of lines when scrolling.
set scrolloff=10
" While searching though a file incrementally highlight matching characters as you type.
set incsearch
" Ignore capital letters during search.
set ignorecase
" Override the ignorecase option if searching for capital letters. This will allow you to search specifically for capital letters.
set smartcase
" Show partial command you type in the last line of the screen.
set showcmd
" Show the mode you are on the last line.
set showmode
" Show matching words during a search.
set showmatch
" Use highlighting when doing a search.
set hlsearch
" Set the commands to save in history default number is 20.
set history=1000
" This is for vim-polyglot
set nocompatible
" lightline configuration
set laststatus=2
let g:lightline = {
\ 'colorscheme': 'nord',
\ }
set noshowmode
" Enable wild menu
set wildmenu
set wildmode=list:longest,full
" Remember fold info
augroup remember_folds
autocmd!
autocmd BufWinLeave,BufLeave,BufWritePost,BufHidden,QuitPre ?* nested silent! mkview!
autocmd BufWinEnter * silent! loadview
augroup END
autocmd BufNew,BufRead *.asm set ft=nasm
au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
set runtimepath+=~/.local/share/vim,~/.local/share/vim/after
set viminfo+=n~/.local/share/vim/viminfo
" Return to last edit position when opening files (You want this!)
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" PLUGINS ---------------------------------------------------------------- {{{
call plug#begin('~/.local/share/vim/plugged')
Plug 'preservim/nerdtree'
Plug 'nordtheme/vim'
Plug 'arcticicestudio/nord-vim'
Plug 'itchyny/lightline.vim'
Plug 'tibabit/vim-templates'
Plug 'godlygeek/tabular'
Plug 'preservim/vim-markdown'
call plug#end()
" Set color scheme to Nord
" if (has("termguicolors"))
" set termguicolors
" endif
colorscheme nord
augroup nord-overrides
autocmd!
autocmd ColorScheme nord highlight MatchParen ctermbg=6 ctermfg=0 guibg=#88C0D0 guifg=#2E3440
augroup END
" }}}
" MAPPINGS --------------------------------------------------------------- {{{
" Mappings code goes here.
" }}}
" VIMSCRIPT -------------------------------------------------------------- {{{
" This will enable code folding.
" Use the marker method of folding.
augroup filetype_vim
autocmd!
autocmd FileType vim setlocal foldmethod=marker
augroup END
" More Vimscripts code goes here.
" }}}
" STATUS LINE ------------------------------------------------------------ {{{
" Status bar code goes here.
" }}}
|