diff options
author | Ekaitz Zárraga <ekaitz.zarraga@gmail.com> | 2016-05-21 12:36:14 +0200 |
---|---|---|
committer | Ekaitz Zárraga <ekaitz.zarraga@gmail.com> | 2016-05-21 12:36:14 +0200 |
commit | b1284d9671d3811cbafb5b10d2a0b6b8ec19376d (patch) | |
tree | 7fd5e21d05bb1aafb4b867904ed02af641f8e340 | |
parent | e8635d9825063e73eaef67ec68397f4d332471a2 (diff) |
NeoVim and Automatic Install:
* Automatic installation file `install.sh` in order to handle
NeoVim config.
* NeoVim config -> a copy from Vims, check that in the future.
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | bash/.bash_profile | 7 | ||||
-rw-r--r-- | install.sh | 7 | ||||
-rw-r--r-- | nvim/nvim/ftdetect/markdown.vim | 2 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/c.vim | 4 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/css.vim | 2 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/drowmark.vim | 27 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/groovy.vim | 2 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/html.vim | 11 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/java.vim | 2 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/javascript.vim | 4 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/markdown.vim | 29 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/perl.vim | 2 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/python.vim | 2 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/sh.vim | 2 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/tex.vim | 11 | ||||
-rw-r--r-- | nvim/nvim/ftplugin/vim.vim | 2 | ||||
-rw-r--r-- | nvim/nvim/init.vim | 67 | ||||
-rw-r--r-- | nvim/nvim/shada/main.shada | bin | 0 -> 159 bytes | |||
-rw-r--r-- | nvim/nvim/spell/en.utf-8.spl | bin | 0 -> 609337 bytes | |||
-rw-r--r-- | nvim/nvim/spell/en.utf-8.sug | bin | 0 -> 556476 bytes | |||
-rw-r--r-- | nvim/nvim/spell/es.utf-8.spl | bin | 0 -> 601019 bytes | |||
-rw-r--r-- | nvim/nvim/spell/es.utf-8.sug | bin | 0 -> 1912378 bytes |
23 files changed, 189 insertions, 5 deletions
@@ -1,11 +1,12 @@ # Configuration files -My dotfiles. Vim, Git, Tmux and Bash for now. +My dotfiles. Vim, NeoVim, Git, Tmux and Bash for now. -Use stow to install them: +Use `install.sh` to install the dotfiles. It uses `stow` internally. -``` Bash -cd dotfiles -stow vim|bash|git|tmux -t ~ +```shell +... $ git clone [THIS REPO] +.../dotfiles $ cd dotfiles +.../dotfiles $ sh install.sh ``` > Stow makes links to the files in the target directory. diff --git a/bash/.bash_profile b/bash/.bash_profile index 5130536..c4f3457 100644 --- a/bash/.bash_profile +++ b/bash/.bash_profile @@ -13,3 +13,10 @@ if [ -f ~/.bash_extra ] ; then fi export TERM=xterm-256color + +# NeoVim configuration +################################################################ +# Create .config if it doesn't exist and set XDG vars +mkdir -p $HOME/.config +XDG_CONFIG_HOME=${XDG_CONFIG_HOME:=$HOME/.config} +XDG_DATA_HOME=${XDG_DATA_HOME:=$HOME/.config} diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..5899025 --- /dev/null +++ b/install.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Link at home folder +stow -t ~ bash vim tmux git + +# Link at XDG_CONFIG_HOME if set, if not to $HOME/.config (they should be the same) +stow -t ${XDG_CONFIG_HOME:=$HOME/.config} nvim diff --git a/nvim/nvim/ftdetect/markdown.vim b/nvim/nvim/ftdetect/markdown.vim new file mode 100644 index 0000000..51b8df5 --- /dev/null +++ b/nvim/nvim/ftdetect/markdown.vim @@ -0,0 +1,2 @@ +" Understand .md as markdown +autocmd BufNewFile,BufRead *.md set ft=markdown diff --git a/nvim/nvim/ftplugin/c.vim b/nvim/nvim/ftplugin/c.vim new file mode 100644 index 0000000..e4d4ca1 --- /dev/null +++ b/nvim/nvim/ftplugin/c.vim @@ -0,0 +1,4 @@ +set tabstop=4 softtabstop=0 expandtab shiftwidth=4 +set autoindent + +set syntax=c.doxygen diff --git a/nvim/nvim/ftplugin/css.vim b/nvim/nvim/ftplugin/css.vim new file mode 100644 index 0000000..6a56808 --- /dev/null +++ b/nvim/nvim/ftplugin/css.vim @@ -0,0 +1,2 @@ +set tabstop=2 softtabstop=0 expandtab shiftwidth=2 +set autoindent diff --git a/nvim/nvim/ftplugin/drowmark.vim b/nvim/nvim/ftplugin/drowmark.vim new file mode 100644 index 0000000..be65689 --- /dev/null +++ b/nvim/nvim/ftplugin/drowmark.vim @@ -0,0 +1,27 @@ +" Spellcheck in markdown (automatic to english) +setlocal spelllang=es +setlocal spell + +" Textwidth for automatic wrap `gq` is formatting operation +setlocal textwidth=79 +setlocal formatoptions+=t +setlocal formatoptions-=l + + +" Highlight where the lines are more than 80 characters wide +setlocal colorcolumn=80 +highlight ColorColumn ctermbg=LightGreen + +" Auto-capitalize script +augroup SENTENCES + au! + autocmd InsertCharPre * if &ft=='drowmark' | if search('\v(%^|[.!?]\_s+|\_^\-\s|\_^title\:\s|\n\n)%#', 'bcnw') != 0 | let v:char = toupper(v:char) | endif | endif +augroup END + +" Highlight spelling errors in red and underline +hi clear SpellBad +hi SpellBad cterm=underline ctermfg=Red + +" Tabs to 2 spaces +set tabstop=2 softtabstop=0 expandtab shiftwidth=2 +set autoindent diff --git a/nvim/nvim/ftplugin/groovy.vim b/nvim/nvim/ftplugin/groovy.vim new file mode 100644 index 0000000..f41f3bf --- /dev/null +++ b/nvim/nvim/ftplugin/groovy.vim @@ -0,0 +1,2 @@ +set tabstop=4 softtabstop=0 expandtab shiftwidth=4 +set autoindent diff --git a/nvim/nvim/ftplugin/html.vim b/nvim/nvim/ftplugin/html.vim new file mode 100644 index 0000000..fc0d53a --- /dev/null +++ b/nvim/nvim/ftplugin/html.vim @@ -0,0 +1,11 @@ +set tabstop=2 softtabstop=0 expandtab shiftwidth=2 +set autoindent + +" Test some wrapping on the html +setlocal textwidth=79 +setlocal formatoptions+=t + +" Highlight where the lines are more than 80 characters wide +setlocal colorcolumn=80 +highlight ColorColumn ctermbg=LightGreen + diff --git a/nvim/nvim/ftplugin/java.vim b/nvim/nvim/ftplugin/java.vim new file mode 100644 index 0000000..f41f3bf --- /dev/null +++ b/nvim/nvim/ftplugin/java.vim @@ -0,0 +1,2 @@ +set tabstop=4 softtabstop=0 expandtab shiftwidth=4 +set autoindent diff --git a/nvim/nvim/ftplugin/javascript.vim b/nvim/nvim/ftplugin/javascript.vim new file mode 100644 index 0000000..d140ed6 --- /dev/null +++ b/nvim/nvim/ftplugin/javascript.vim @@ -0,0 +1,4 @@ +set tabstop=2 softtabstop=0 expandtab shiftwidth=2 +set autoindent + +let javaScript_fold=1 diff --git a/nvim/nvim/ftplugin/markdown.vim b/nvim/nvim/ftplugin/markdown.vim new file mode 100644 index 0000000..f891b35 --- /dev/null +++ b/nvim/nvim/ftplugin/markdown.vim @@ -0,0 +1,29 @@ +setlocal syntax=markdown + +" Spellcheck in markdown (automatic to english) +setlocal spelllang=en +setlocal spell + +" Textwidth for automatic wrap `gq` is formatting operation +setlocal textwidth=79 +setlocal formatoptions+=t +setlocal formatoptions-=l + + +" Highlight where the lines are more than 80 characters wide +setlocal colorcolumn=80 +highlight ColorColumn ctermbg=LightGreen + +" Auto-capitalize script +augroup SENTENCES + au! + autocmd InsertCharPre * if &ft=='markdown' | if search('\v(%^|[.!?]\_s+|\_^\-\s|\_^title\:\s|\n\n)%#', 'bcnw') != 0 | let v:char = toupper(v:char) | endif | endif +augroup END + +" Highlight spelling errors in red and underline +hi clear SpellBad +hi SpellBad cterm=underline ctermfg=Red + +" Tabs to 2 spaces +set tabstop=2 softtabstop=0 expandtab shiftwidth=2 +set autoindent diff --git a/nvim/nvim/ftplugin/perl.vim b/nvim/nvim/ftplugin/perl.vim new file mode 100644 index 0000000..f41f3bf --- /dev/null +++ b/nvim/nvim/ftplugin/perl.vim @@ -0,0 +1,2 @@ +set tabstop=4 softtabstop=0 expandtab shiftwidth=4 +set autoindent diff --git a/nvim/nvim/ftplugin/python.vim b/nvim/nvim/ftplugin/python.vim new file mode 100644 index 0000000..f41f3bf --- /dev/null +++ b/nvim/nvim/ftplugin/python.vim @@ -0,0 +1,2 @@ +set tabstop=4 softtabstop=0 expandtab shiftwidth=4 +set autoindent diff --git a/nvim/nvim/ftplugin/sh.vim b/nvim/nvim/ftplugin/sh.vim new file mode 100644 index 0000000..f41f3bf --- /dev/null +++ b/nvim/nvim/ftplugin/sh.vim @@ -0,0 +1,2 @@ +set tabstop=4 softtabstop=0 expandtab shiftwidth=4 +set autoindent diff --git a/nvim/nvim/ftplugin/tex.vim b/nvim/nvim/ftplugin/tex.vim new file mode 100644 index 0000000..fc0d53a --- /dev/null +++ b/nvim/nvim/ftplugin/tex.vim @@ -0,0 +1,11 @@ +set tabstop=2 softtabstop=0 expandtab shiftwidth=2 +set autoindent + +" Test some wrapping on the html +setlocal textwidth=79 +setlocal formatoptions+=t + +" Highlight where the lines are more than 80 characters wide +setlocal colorcolumn=80 +highlight ColorColumn ctermbg=LightGreen + diff --git a/nvim/nvim/ftplugin/vim.vim b/nvim/nvim/ftplugin/vim.vim new file mode 100644 index 0000000..f41f3bf --- /dev/null +++ b/nvim/nvim/ftplugin/vim.vim @@ -0,0 +1,2 @@ +set tabstop=4 softtabstop=0 expandtab shiftwidth=4 +set autoindent diff --git a/nvim/nvim/init.vim b/nvim/nvim/init.vim new file mode 100644 index 0000000..fcc7f55 --- /dev/null +++ b/nvim/nvim/init.vim @@ -0,0 +1,67 @@ +" Vundle stuff ---------------------------------------------- +set nocompatible +filetype off +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +" let Vundle manage Vundle, required +Plugin 'VundleVim/Vundle.vim' + +" Post to Wordpress using MarkDown +Plugin 'ekaitz-zarraga/droWMark' + +" Navigate in directory tree +Plugin 'scrooloose/nerdtree' + +" Add plugins here + +call vundle#end() " required +" / Vundle stuff end ---------------------------------------- + +" Allow backspace always +set backspace=indent,eol,start + +" Activate syntax highlighting by default +syntax on + +" Different config for each filetype +filetype plugin on + +" Show trailing spaces +highlight ExtraWhitespace ctermbg=red guibg=red +match ExtraWhitespace /\s\+$/ +autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ +autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/ +autocmd InsertLeave * match ExtraWhitespace /\s\+$/ +autocmd BufWinLeave * call clearmatches() + +" Clear trailing spaces on <F2> +function TrimWhiteSpace() + %s/\s*$// + '' +:endfunction +nnoremap <F2> :call TrimWhiteSpace()<CR> + +" Fold +set foldmethod=syntax +set foldlevelstart=99 + +" HighLight search and map CarrierReturn to remove highlight +set hlsearch +nnoremap <CR> :noh<CR><CR> + +" Ignore Case in search +set ignorecase +set smartcase + +" Always show tabline (0=never, 1=when there are at least 2 tabs, 2=always) +set showtabline=2 + +" Mouse support +set mouse=a + +" Enable TRUE COLORS +let $NVIM_TUI_ENABLE_TRUE_COLOR=1 + +" Set default colorscheme but dark comments -> Torte +colorscheme torte diff --git a/nvim/nvim/shada/main.shada b/nvim/nvim/shada/main.shada Binary files differnew file mode 100644 index 0000000..5bd2ed1 --- /dev/null +++ b/nvim/nvim/shada/main.shada diff --git a/nvim/nvim/spell/en.utf-8.spl b/nvim/nvim/spell/en.utf-8.spl Binary files differnew file mode 100644 index 0000000..83b9b8f --- /dev/null +++ b/nvim/nvim/spell/en.utf-8.spl diff --git a/nvim/nvim/spell/en.utf-8.sug b/nvim/nvim/spell/en.utf-8.sug Binary files differnew file mode 100644 index 0000000..1add0c6 --- /dev/null +++ b/nvim/nvim/spell/en.utf-8.sug diff --git a/nvim/nvim/spell/es.utf-8.spl b/nvim/nvim/spell/es.utf-8.spl Binary files differnew file mode 100644 index 0000000..62d848d --- /dev/null +++ b/nvim/nvim/spell/es.utf-8.spl diff --git a/nvim/nvim/spell/es.utf-8.sug b/nvim/nvim/spell/es.utf-8.sug Binary files differnew file mode 100644 index 0000000..9064321 --- /dev/null +++ b/nvim/nvim/spell/es.utf-8.sug |