summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zárraga <ekaitz.zarraga@gmail.com>2016-10-24 13:46:42 +0200
committerEkaitz Zárraga <ekaitz.zarraga@gmail.com>2016-10-24 13:46:42 +0200
commit88a8603d999864c23cacd84d1e26d01898e437f3 (patch)
treee55f075267eeab1cbfbde07f4df6d75091d6a164
parent85c2f7c86b0542dea26c0a81dc5ab255111395f2 (diff)
Refurbish the init.vim
-rw-r--r--nvim/nvim/init.vim82
1 files changed, 52 insertions, 30 deletions
diff --git a/nvim/nvim/init.vim b/nvim/nvim/init.vim
index 099a7c5..40eb36b 100644
--- a/nvim/nvim/init.vim
+++ b/nvim/nvim/init.vim
@@ -1,4 +1,5 @@
-" Vundle stuff ----------------------------------------------
+" VUNDLE:
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
filetype off
set rtp+=$XDG_CONFIG_HOME/nvim/bundle/Vundle.vim
@@ -16,20 +17,45 @@ Plugin 'kchmck/vim-coffee-script'
" Add plugins here
call vundle#end() " required
-" / Vundle stuff end ----------------------------------------
-
-" Allow backspace always
-set backspace=indent,eol,start
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" GUI:
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Activate syntax highlighting by default
syntax on
-" Different config for each filetype
-filetype plugin on
+" Enable TRUE COLORS
+let $NVIM_TUI_ENABLE_TRUE_COLOR=1
+
+" Set default colorscheme but dark comments -> Torte
+colorscheme torte
" Show trailing spaces
set list lcs=trail:·,tab:»·
+" Always show tabline (0=never, 1=when there are at least 2 tabs, 2=always)
+set showtabline=1
+
+" Explore configured to show tree
+let g:netrw_liststyle= 3
+
+" Mouse support
+set mouse=a
+
+" Fold
+set foldmethod=indent
+set foldlevelstart=99
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" EDITION:
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" Allow backspace always
+set backspace=indent,eol,start
+
+" Change buffers without needing to save
+set hidden
+
" Clear trailing spaces on <F2>
function TrimWhiteSpace()
%s/\s*$//
@@ -37,9 +63,12 @@ function TrimWhiteSpace()
:endfunction
nnoremap <F2> :call TrimWhiteSpace()<CR>
-" Fold
-set foldmethod=indent
-set foldlevelstart=99
+" Default tabs
+set tabstop=4 softtabstop=0 expandtab shiftwidth=4
+set autoindent
+
+
+" SEARCH
" HighLight search and map CarrierReturn to remove highlight
set hlsearch
@@ -49,32 +78,25 @@ nnoremap <CR> :noh<CR><CR>
set ignorecase
set smartcase
-" Always show tabline (0=never, 1=when there are at least 2 tabs, 2=always)
-set showtabline=1
-
-" Mouse support
-set mouse=a
-
-" Enable TRUE COLORS
-let $NVIM_TUI_ENABLE_TRUE_COLOR=1
-" Set default colorscheme but dark comments -> Torte
-colorscheme torte
+" TEXT WIDTH
-" Default tabs
-set tabstop=4 softtabstop=0 expandtab shiftwidth=4
-set autoindent
+" Textwidth for automatic wrap, `gq` is formatting operation
+set textwidth=79
+set formatoptions=tcqj
-" Change buffers without needing to save
-set hidden
+" Highlight where the lines are more than 80 characters wide
+set colorcolumn=80
+highlight ColorColumn ctermbg=DarkGrey
-" Explore configured to show tree
-let g:netrw_liststyle= 3
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" TERMINAL:
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Make terminal remap to go out of insert mode
:tnoremap <Esc> <C-\><C-n>
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Highlight where the lines are more than 80 characters wide
-setlocal colorcolumn=80
-highlight ColorColumn ctermbg=DarkGrey
+" Different config for each filetype
+filetype plugin on