-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
80 lines (65 loc) · 1.93 KB
/
vimrc
File metadata and controls
80 lines (65 loc) · 1.93 KB
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
set modeline
filetype off
filetype plugin indent on
syntax on
set shiftwidth=2
set softtabstop=2
set tabstop=2
set shiftround
set expandtab
"autoreload .vimrc
autocmd! bufwritepost .vimrc source %
"better copy and paste
set pastetoggle=<F2>
nmap <c-n><c-n> :set invnumber<CR>
set clipboard=unnamed
" Rebind <Leader> key
" I like to have it here becuase it is easier to reach than the default and
" it is next to ``m`` and ``n`` which I use for navigating between tabs.
let mapleader = ","
set showcmd
" easier moving between tabs
map <Leader>n <esc>:tabprevious<CR>
map <Leader>m <esc>:tabnext<CR>
" bind Ctrl+<movement> keys to move around the windows, instead of using Ctrl+w + <movement>
" Every unnecessary keystroke that can be saved is good for your health :)
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
map <c-h> <c-w>h
set splitbelow
set splitright
" easier moving of code blocks
" Try to go into visual mode (v), thenselect several lines of code here and
" then press ``>`` several times.
vnoremap < <gv " better indentation
vnoremap > >gv " better indentation
" map sort function to a key
vnoremap <Leader>s :sort<CR>
set number
set relativenumber
set tw=79
set nowrap
set fo-=t " don't automatically wrap text when typing
set colorcolumn=80
highlight ColorColumn ctermbg=233
colorscheme habamax
" Useful settings
set history=700
set undolevels=700
" Make search case insensitive
set hlsearch
set incsearch
set ignorecase
set smartcase
" Setup Pathogen to manage your plugins
" mkdir -p ~/.vim/autoload ~/.vim/bundle
" curl -so ~/.vim/autoload/pathogen.vim https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim
" Now you can install any plugin into a .vim/bundle/plugin-name/ folder
execute pathogen#infect()
" Settings for vim-powerline
" cd ~/.vim/bundle
" git clone git://github.com/Lokaltog/vim-powerline.git
set laststatus=2
set backspace=indent,eol,start
let g:EditorConfig_exclude_patterns = ['fugitive://.*']