summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/after/ftplugin/freefem/folding.vim20
-rw-r--r--vim/vimrc11
-rw-r--r--zsh/alias13
3 files changed, 36 insertions, 8 deletions
diff --git a/vim/after/ftplugin/freefem/folding.vim b/vim/after/ftplugin/freefem/folding.vim
new file mode 100644
index 0000000..7d2f6fd
--- /dev/null
+++ b/vim/after/ftplugin/freefem/folding.vim
@@ -0,0 +1,20 @@
+function! FreeFemFolds()
+ let thisline = getline(v:lnum)
+ if match(thisline,'^/// ') >= 0
+ return ">1"
+ else
+ return "="
+ endif
+endfunction
+
+function! FreeFemFoldText()
+ let startline = getline(v:foldstart)
+ if match(startline,'^/// ') >= 0
+ let title = substitute(startline,'^/// \(.*\)$','\1',"")
+ return '# ' . title
+ endif
+endfunction
+
+setlocal foldmethod=expr
+setlocal foldexpr=FreeFemFolds()
+setlocal foldtext=FreeFemFoldText()
diff --git a/vim/vimrc b/vim/vimrc
index 69d2ea8..d0f6a78 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -27,6 +27,9 @@ Plug 'honza/vim-snippets'
Plug 'jamessan/vim-gnupg'
Plug 'junegunn/seoul256.vim'
Plug 'junegunn/vim-easy-align'
+xmap ga <Plug>(EasyAlign)
+nmap ga <Plug>(EasyAlign)
+
Plug 'junegunn/vim-peekaboo'
Plug 'junegunn/vim-pseudocl'
Plug 'junegunn/vim-oblique'
@@ -71,7 +74,10 @@ Plug 'tpope/vim-commentary'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-flagship'
-function Mixed_indent()
+let g:tabprefix = ""
+let g:tablabel = "%N%{flagship#tabmodified()} %{flagship#tabcwds('shorten',',')}"
+
+function! Mixed_indent()
let l:spaces=search('\v(^ +)','n')
let l:tabs=search('\v(^\t+)','n')
return (l:spaces * l:tabs > 0)
@@ -134,7 +140,6 @@ call plug#end()
let g:tex_conceal= 'adgm'
let g:tex_flavor='latex'
-let g:tabprefix = ""
"" Vim options
@@ -273,7 +278,7 @@ if has("nvim")
nnoremap <a-w> :w<cr>
nnoremap <a-d> :q<cr>
- nnoremap <a-cr> :tabnew<cr>
+ nnoremap <a-t> :tabnew<cr>
nnoremap <a-b> :CtrlPBuffer<cr>
nnoremap <a-f> :CtrlP<cr>
diff --git a/zsh/alias b/zsh/alias
index 7b07159..eec0c35 100644
--- a/zsh/alias
+++ b/zsh/alias
@@ -4,19 +4,22 @@
alias c='clear'
alias ca='printf "\ec"'
alias cdd='cd ~/dotfiles'
+
+# Shortcut to files
alias notes='vim ~/dotfiles/.notes'
+alias el='nvim ~/dotfiles/ledger/perso.ledger'
# Programs
alias a='vifm . .'
-alias e='nvim'
alias ff='FreeFem++'
alias g='git'
alias l='ledger'
-alias el='nvim ~/dotfiles/ledger/perso.ledger'
alias m='cd ~/.mutt/attachments && mutt && cd -'
-alias n='newsbeuter'
-alias v='nvim'
-alias vims="nvim -S Session.vim"
+alias e='nvim'
+alias n='nvim'
+alias ns='nvim -S Session.vim'
+alias v='vim'
+alias vs="vim -S Session.vim"
# Build
alias mc='make clean'