aboutsummaryrefslogtreecommitdiff
path: root/stow/vim
diff options
context:
space:
mode:
Diffstat (limited to 'stow/vim')
-rw-r--r--stow/vim/.vim/ftplugin/python/python.vim15
-rw-r--r--stow/vim/.vim/ftplugin/sh/sh.vim3
-rw-r--r--stow/vim/.vim/ftplugin/sh/snippets/template.txt18
-rw-r--r--stow/vim/.vim/ftplugin/tex/tex.vim5
-rw-r--r--stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim2
-rw-r--r--stow/vim/.vim/rc/color.vim1
-rw-r--r--stow/vim/.vim/rc/vimwiki.vim29
-rw-r--r--stow/vim/.vimrc9
8 files changed, 59 insertions, 23 deletions
diff --git a/stow/vim/.vim/ftplugin/python/python.vim b/stow/vim/.vim/ftplugin/python/python.vim
index 0aeff8c..dab8c22 100644
--- a/stow/vim/.vim/ftplugin/python/python.vim
+++ b/stow/vim/.vim/ftplugin/python/python.vim
@@ -10,21 +10,20 @@ setlocal list
call matchadd('ColorColumn', '\%91v', 100)
setlocal textwidth=90
-let b:ale_python_pylint_options = '-d invalid-name'
-let b:ale_fixers = ['yapf']
+"let b:ale_python_pylint_options = '-d invalid-name'
+"let b:ale_fixers = ['yapf']
" Mappings
let mapleader = " "
nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/python/python.vim<CR>
-nnoremap <buffer> <leader>x :! ./%
-nnoremap <buffer> <leader>X :! ./%<CR>
+nnoremap <buffer> <leader>x :w<CR>:!./%<Space>
+nnoremap <buffer> <leader>X :w<CR>:!./%<CR>
-nnoremap <buffer> gd <Plug>(coc-definition)
-nnoremap <buffer> gy <Plug>(coc-type-definition)
-nnoremap <buffer> gi <Plug>(coc-implementation)
-nnoremap <buffer> gr <Plug>(coc-references)
+"nnoremap <buffer> gd <Plug>(coc-definition)
+"nnoremap <buffer> gy <Plug>(coc-type-definition)
+"nnoremap <buffer> gr <Plug>(coc-references)
nnoremap <buffer> <leader>s oimport pdb<Enter>pdb.set_trace()<Esc>2k
nnoremap <buffer> <leader>db :!tmux split-window -l '40\%' 'python -m̀ pdb %'
diff --git a/stow/vim/.vim/ftplugin/sh/sh.vim b/stow/vim/.vim/ftplugin/sh/sh.vim
index cc52e08..58d39fe 100644
--- a/stow/vim/.vim/ftplugin/sh/sh.vim
+++ b/stow/vim/.vim/ftplugin/sh/sh.vim
@@ -11,13 +11,12 @@ setlocal textwidth=110
let mapleader = " "
nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/sh/sh.vim<CR><CR>
-nnoremap <buffer> <leader>sh :read ~/.vim/ftplugin/sh/snippets/template.txt<CR><CR>
nnoremap <buffer> <leader>+x :!chmod 744 %<CR><CR>
nnoremap <buffer> <leader>x :w<CR>:!./%<Space>
nnoremap <buffer> <leader>X :w<CR>:!./%<CR><CR>
-nnoremap <buffer> <leader>e :Errors<CR>
let mapleader = ","
+inoremap <buffer> <leader>sh <Esc>:read ~/.vim/ftplugin/sh/snippets/template.txt<CR><CR>
inoremap <buffer> <leader>if <Esc>:read ~/.vim/ftplugin/sh/snippets/if.txt<CR>kdd/<+++><CR>cf>
inoremap <buffer> <leader>case <Esc>:read ~/.vim/ftplugin/sh/snippets/case.txt<CR>kdd/<+++><CR>cf>
diff --git a/stow/vim/.vim/ftplugin/sh/snippets/template.txt b/stow/vim/.vim/ftplugin/sh/snippets/template.txt
index 64d3a2e..171dcf8 100644
--- a/stow/vim/.vim/ftplugin/sh/snippets/template.txt
+++ b/stow/vim/.vim/ftplugin/sh/snippets/template.txt
@@ -4,7 +4,15 @@
#
# Usage: template.sh [-ac] [-b OPTARG] FILE...
-usageMessage="Usage: template.sh [-ac] [-b OPTARG] FILE..."
+usageMessage="Usage: ${0} [-ac] [-b OPTARG] FILE..."
+
+error() {
+ printf '%s error: %s\n' "$0" "$*" >&2
+}
+
+errorAndUsage() {
+ printf '%s error: %s\n%s\n' "$0" "$*" "$usageMessage" >&2
+}
# Process options
while getopts ':ab:c' opt; do
@@ -15,7 +23,7 @@ while getopts ':ab:c' opt; do
;;
'b' )
- echo b $OPTARG
+ echo b "$OPTARG"
;;
'c' )
@@ -23,11 +31,9 @@ while getopts ':ab:c' opt; do
;;
'?' )
- printf "${usageMessage}\n"
+ printf '%s\n' "$usageMessage"
exit 1
esac
done
-shift $(($OPTIND - 1))
-
-<++>
+shift $((OPTIND - 1))
diff --git a/stow/vim/.vim/ftplugin/tex/tex.vim b/stow/vim/.vim/ftplugin/tex/tex.vim
index 87f3c88..f84f73e 100644
--- a/stow/vim/.vim/ftplugin/tex/tex.vim
+++ b/stow/vim/.vim/ftplugin/tex/tex.vim
@@ -6,10 +6,15 @@
call matchadd('ColorColumn', '\%91v', 100)
setlocal textwidth=80
+setlocal omnifunc=v:lua.vim.lsp.omnifunc
+setlocal formatexpr=v:lua.vim.lsp.formatexpr()
+
let mapleader = " "
nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/tex/tex.vim<CR>
nnoremap <buffer> <leader>e :Errors<CR>
+nnoremap <buffer> K :lua vim.lsp.buf.hover()<CR>
+nnoremap <buffer> gd :lua vim.lsp.buf.definition()<CR>
" proselint not enabled by default (it's slow)
"nnoremap <buffer> <leader>sp :SyntasticCheck proselint<CR>
diff --git a/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim b/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim
index d51844b..3a6a661 100644
--- a/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim
+++ b/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim
@@ -20,8 +20,6 @@ highlight Title ctermfg=blue
highlight TitleHash ctermfg=cyan
match TitleHash /^##*/
-setlocal conceallevel=0
-
let mapleader = " "
nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/vimwiki/vimwiki.vim<CR>
diff --git a/stow/vim/.vim/rc/color.vim b/stow/vim/.vim/rc/color.vim
index ea8bf0e..ec18335 100644
--- a/stow/vim/.vim/rc/color.vim
+++ b/stow/vim/.vim/rc/color.vim
@@ -25,6 +25,7 @@ highlight MatchParen ctermbg=cyan ctermfg=black
" Errors colors
highlight Error ctermbg=red ctermfg=black
+highlight ErrorMsg ctermbg=red ctermfg=black
highlight SpellBad ctermbg=red ctermfg=black
" Comments colors
diff --git a/stow/vim/.vim/rc/vimwiki.vim b/stow/vim/.vim/rc/vimwiki.vim
index e31d2da..c46f815 100644
--- a/stow/vim/.vim/rc/vimwiki.vim
+++ b/stow/vim/.vim/rc/vimwiki.vim
@@ -2,6 +2,33 @@ Plug 'vimwiki/vimwiki'
" For vimwiki
" filetype plugin on
+
+" Register relationships of extensions to syntaxes
let g:vimwiki_ext2syntax = {'.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
-let g:vimwiki_list = [{'path': '~/docs/notas/', 'syntax': 'markdown', 'ext': '.md'},
+
+let g:vimwiki_list = [{'path': '~/docs/notas/', 'syntax': 'markdown', 'ext': '.md', 'diary_rel_path': 'diario/', 'diary_index': 'index'},
\ {'path': '~/docs/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
+
+let g:vimwiki_conceallevel = 1
+
+" Treat files with registered extensions as vimwiki
+let g:vimwiki_global_ext = 1
+
+" Symbols to show progression of list items
+let g:vimwiki_listsyms = ' .oOX'
+
+" Append wiki file extension to links in Markdown
+let g:vimwiki_markdown_link_ext = 1
+
+" Perform an :lcd to the wiki's root folder on page opening
+let g:vimwiki_auto_chdir = 1
+
+" Automatically generate a level 1 header when creating a new wiki page
+let g:vimwiki_auto_header = 1
+
+let g:vimwiki_diary_months = {
+ \ 1: 'Enero', 2: 'Febrero', 3: 'Marzo',
+ \ 4: 'Abril', 5: 'Mayo', 6: 'Junio',
+ \ 7: 'Julio', 8: 'Agosto', 9: 'Septiembre',
+ \ 10: 'Octubre', 11: 'Noviembre', 12: 'Diciembre'
+\ }
diff --git a/stow/vim/.vimrc b/stow/vim/.vimrc
index db8302a..9ef44be 100644
--- a/stow/vim/.vimrc
+++ b/stow/vim/.vimrc
@@ -15,18 +15,16 @@ source ~/.vim/rc/git.vim
call plug#begin('~/.vim/plugged') "Update with PlugInstall
Plug 'PotatoesMaster/i3-vim-syntax'
+Plug 'dylanaraps/wal.vim'
Plug 'arcticicestudio/nord-vim'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
"Plug 'psliwka/vim-smoothie'
-Plug 'dylanaraps/wal.vim'
+Plug 'neovim/nvim-lspconfig'
source ~/.vim/rc/goyo.vim
source ~/.vim/rc/fzf.vim
source ~/.vim/rc/vimwiki.vim
source ~/.vim/rc/airline.vim
-source ~/.vim/rc/nvim-jdtls.vim
-"source ~/.vim/rc/ale.vim
-source ~/.vim/rc/coc.vim
call plug#end()
@@ -36,4 +34,7 @@ call plug#end()
"source ~/.vim/rc/omnisharp.vim
"source ~/.vim/rc/syntastic.vim
"source ~/.vim/rc/deoplete.vim
+"source ~/.vim/rc/ale.vim
+"source ~/.vim/rc/coc.vim
"source ~/.vim/rc/youCompleteMe.vim
+"source ~/.vim/rc/nvim-jdtls.vim