summaryrefslogtreecommitdiff
path: root/vim/.vim/vimrc
blob: e03b765750f7f9eb74b05f82d1f89fd52156d81c (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
syntax on
set encoding=UTF-8
	
let mapleader = " "

" Just some nice stuff
set relativenumber          "Me likey
set smartindent             "Tõmbab joonele - näiteks commentitd siinsamas
set nowrap                  "Line goes off the screen
set noswapfile              "dont need those
set belloff=all             "Stupid BELL
set clipboard=unnamedplus   "copy pase out of Vim

au BufEnter * set fo-=cro   "Peab nii, muidu plugin runnib üle
"set cursorline             "highlight line where the cursor is currently


"Cursor placement
set sidescrolloff=999
set scrolloff=999

"tabs vs spaces ?
set tabstop=4               "Tabs to 4 spaces
set shiftwidth=4            
set expandtab               "convert from tab to spaces

"Splits
set splitbelow splitright

"Search
set hlsearch
set incsearch               "from first letter
set ignorecase
set smartcase               "Capital letter serach looks for that, you know

"YML files - very nice
autocmd Filetype yaml set cursorcolumn
autocmd Filetype yml set cursorcolumn



"Binds

nnoremap <leader>nh :noh<CR>
"disable search highlight
nnoremap <leader>t :term<CR>
"terminal

"Nerdtree
nnoremap <leader>e :NERDTreeToggle<CR>



"""Plugins"""

"Get vim-plug incase isn't installed
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
  silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
  autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif



call plug#begin()

Plug 'flazz/vim-colorschemes'   "Yes
Plug 'preservim/nerdtree'       "Tree
Plug 'ryanoasis/vim-devicons'   "Tree icons
Plug 'itchyny/lightline.vim'    "Line

call plug#end()



colorscheme wombat
"wombat             - blueish niceish
"terra/nord/nighfox - also ok

set laststatus=2    "To see Line
set noshowmode      "Disable double insert
let g:lightline = {'colorscheme': 'wombat',}


"Remapperinjo
inoremap jj <Esc>

"nnoremap gg G
"nnoremap G gg
nnoremap K 10j
nnoremap L 10k

"set viminfo=%,<800,'10,/50,:100,h,f0,n~/.vim/cache/.viminfo "stupid file in home dir
set viminfo=