Created
November 21, 2016 00:32
-
-
Save ToniRib/f093100e557f5e75427e144a0d8dcda1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " ============================================================================ | |
| " Toni Rib's vimrc | |
| " ============================================================================ | |
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| set shell=sh | |
| " -------------------------------- Mappings --------------------------------- | |
| " Use the space key as our leader. Put this near the top of your vimrc | |
| let mapleader = "\<Space>" | |
| " Map Ctrl-s to write the file | |
| nmap <C-s> :w<cr> | |
| imap <C-s> <esc>:w<cr> | |
| " Map Ctrl-k to file explorer | |
| nmap <C-k> :E<cr> | |
| " Split edit your vimrc. Type space, v, r in sequence to trigger | |
| nmap <leader>vr :sp $MYVIMRC<cr> | |
| " Source (reload) your vimrc. Type space, s, o in sequence to trigger | |
| nmap <leader>so :source $MYVIMRC<cr> | |
| " Exit vim easily | |
| nmap <leader>q :q<cr> | |
| " 0 moves to the beginning of the line | |
| nmap 0 ^ | |
| " Exit out of insert mode with jk or kj | |
| imap jk <esc> | |
| imap kj <esc> | |
| " ----------------------------- Vundle Setup --------------------------------- | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " alternatively, pass a path where Vundle should install plugins | |
| "call vundle#begin('~/some/path/here') | |
| " let Vundle manage Vundle, required | |
| Plugin 'VundleVim/Vundle.vim' | |
| " Lightline status line | |
| Plugin 'itchyny/lightline.vim' | |
| " Vim Fugitive | |
| Plugin 'tpope/vim-fugitive' | |
| " CtrlP Fuzzy File Finder | |
| Plugin 'ctrlpvim/ctrlp.vim' | |
| " All of your Plugins must be added before the following line | |
| call vundle#end() " required | |
| filetype plugin indent on " required | |
| " To ignore plugin indent changes, instead use: | |
| "filetype plugin on | |
| " | |
| " 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 | |
| " ----------------------------- Lightline Setup ------------------------------ | |
| let g:lightline = { | |
| \ 'colorscheme': 'wombat', | |
| \ 'active': { | |
| \ 'left': [ [ 'mode', 'paste' ], | |
| \ [ 'fugitive', 'readonly', 'filename', 'modified' ] ] | |
| \ }, | |
| \ 'component': { | |
| \ 'readonly': '%{&filetype=="help"?"":&readonly?"-":""}', | |
| \ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}', | |
| \ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}' | |
| \ }, | |
| \ 'component_visible_condition': { | |
| \ 'readonly': '(&filetype!="help"&& &readonly)', | |
| \ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))', | |
| \ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())' | |
| \ }, | |
| \ 'separator': { 'left': '>', 'right': '<' }, | |
| \ 'subseparator': { 'left': '>', 'right': '<' } | |
| \ } | |
| " ----------------------------- Other Setup --------------------------------- | |
| syntax on | |
| colorscheme holokai | |
| " Better command-line completion | |
| set wildmenu | |
| " Show partial commands in the last line of the screen | |
| set showcmd | |
| " Highlight searches (use <C-L> to temporarily turn off highlighting; see the | |
| " mapping of <C-L> below) | |
| set hlsearch | |
| " Use case insensitive search, except when using capital letters | |
| set ignorecase | |
| set smartcase | |
| " Allow backspacing over autoindent, line breaks and start of insert action | |
| set backspace=indent,eol,start | |
| " When opening a new line and no filetype-specific indenting is enabled, keep | |
| " the same indent as the line you're currently on. Useful for READMEs, etc. | |
| set autoindent | |
| " Display the cursor position on the last line of the screen or in the status | |
| " line of a window | |
| set ruler | |
| " Always display the status line, even if only one window is displayed | |
| set laststatus=2 | |
| " Display line numbers on the left | |
| set number | |
| " Set the tree listing style | |
| let g:netrw_liststyle=3 | |
| " Indentation settings for using 4 spaces instead of tabs. | |
| " Do not change 'tabstop' from its default value of 8 with this setup. | |
| set shiftwidth=2 | |
| set softtabstop=2 | |
| set expandtab | |
| set textwidth=80 | |
| set colorcolumn=+1 | |
| " Make CtrlP use ag for listing the files. Way faster and no useless files. | |
| let g:ctrlp_user_command = 'ag %s -l --hidden --nocolor -g ""' | |
| let g:ctrlp_use_caching = 0 | |
| " Set git commit width to 72 | |
| autocmd Filetype gitcommit setlocal spell textwidth=72 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requires holokai color scheme, found here and put under ~/.vim/colors
https://github.com/changyuheng/color-scheme-holokai-for-vim/blob/master/colors/holokai.vim