This commit is contained in:
Julian Ospald 2020-08-22 20:37:20 +02:00
parent 2c6ffd02e5
commit 8143c60b21
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
18 changed files with 708 additions and 53 deletions

View File

@ -49,7 +49,7 @@ nnoremap <leader>hc :HoogleClose<CR>
" haskell-vim " haskell-vim
let g:haskell_classic_highlighting = 1 let g:haskell_classic_highlighting = 1
let g:haskell_indent_disable = 1 let g:haskell_indent_disable = 0
" let g:haskell_enable_quantification = 1 " let g:haskell_enable_quantification = 1
" let g:haskell_enable_recursivedo = 1 " let g:haskell_enable_recursivedo = 1
" let g:haskell_enable_arrowsyntax = 1 " let g:haskell_enable_arrowsyntax = 1
@ -58,9 +58,10 @@ let g:haskell_indent_disable = 1
" let g:haskell_indent_if = 3 " let g:haskell_indent_if = 3
" let g:haskell_indent_case = 5 " let g:haskell_indent_case = 5
" let g:haskell_indent_let = 4 " let g:haskell_indent_let = 4
" let g:haskell_indent_where = 6 let g:haskell_indent_where = 2
" let g:haskell_indent_do = 3 " let g:haskell_indent_do = 3
" let g:haskell_indent_in = 1 " let g:haskell_indent_in = 1
let g:haskell_disable_TH = 1
" haskellmode-vim " haskellmode-vim
@ -209,3 +210,40 @@ call deoplete#custom#source('LanguageClient',
\ 'min_pattern_length', \ 'min_pattern_length',
\ 2) \ 2)
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>" inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
let g:tagbar_type_haskell = {
\ 'ctagsbin' : 'hasktags',
\ 'ctagsargs' : '-x -c -o-',
\ 'kinds' : [
\ 'm:modules:0:1',
\ 'd:data: 0:1',
\ 'd_gadt: data gadt:0:1',
\ 't:type names:0:1',
\ 'nt:new types:0:1',
\ 'c:classes:0:1',
\ 'cons:constructors:1:1',
\ 'c_gadt:constructor gadt:1:1',
\ 'c_a:constructor accessors:1:1',
\ 'ft:function types:1:1',
\ 'fi:function implementations:0:1',
\ 'i:instance:0:1',
\ 'o:others:0:1'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 'm' : 'module',
\ 'c' : 'class',
\ 'd' : 'data',
\ 't' : 'type',
\ 'i' : 'instance'
\ },
\ 'scope2kind' : {
\ 'module' : 'm',
\ 'class' : 'c',
\ 'data' : 'd',
\ 'type' : 't',
\ 'instance' : 'i'
\ }
\ }

View File

@ -1,5 +1,5 @@
" echodoc " echodoc
set cmdheight=2 " set cmdheight=2
let g:echodoc#enable_at_startup = 1 let g:echodoc#enable_at_startup = 1
let g:echodoc#type = 'signature' let g:echodoc#type = 'signature'
@ -198,3 +198,19 @@ let g:perl_fold_blocks = 1
let g:r_syntax_folding = 1 let g:r_syntax_folding = 1
let g:rust_fold = 1 let g:rust_fold = 1
let g:haskell_fold = 1 let g:haskell_fold = 1
" tagbar
let g:tagbar_map_togglefold = ['za']
let g:tagbar_map_togglecaseinsensitive = 'zi'
" Nerdtree
let g:NERDTreeMapActivateNode = '<CR>'
let g:NERDTreeMapCustomOpen = ''
let g:NERDTreeMapOpenExpl = 'n'
" let g:NERDTreeMapOpenSplit = ''
" overwrite nonsense from editorconfig
let g:EditorConfig_max_line_indicator = 'none'
" let g:EditorConfig_preserve_formatoptions = 1

View File

@ -1,4 +1,14 @@
nnoremap <SPACE> <Nop>
let g:mapleader = ' '
" Quickly insert an empty new line without entering insert mode
nnoremap <Leader>o o<Esc>
nnoremap <Leader>O O<Esc>
" workman " workman
noremap <C-K> <C-O>
noremap <Tab> <C-I>
noremap e j noremap e j
noremap o k noremap o k
noremap n h noremap n h
@ -39,18 +49,46 @@ nnoremap <silent> <c-w>i :wincmd l<cr>
nnoremap <silent> <c-w>k :wincmd n<cr> nnoremap <silent> <c-w>k :wincmd n<cr>
nnoremap <silent> <c-w>l :wincmd o<cr> nnoremap <silent> <c-w>l :wincmd o<cr>
nnoremap <c-n> b vnoremap <c-n> B
nnoremap <c-i> e vnoremap <c-i> W
nnoremap <c-n> B
nnoremap <c-i> W
vnoremap <A-n> b
vnoremap <A-i> w
nnoremap <A-n> b
nnoremap <A-i> w
" nnoremap <c-n>i e
" get control-j back, so switch it with ctrl-n at qwerty position of j " get control-j back, so switch it with ctrl-n at qwerty position of j
imap <c-n> <cr> " imap <c-n> <cr>
cmap <c-n> <cr> " cmap <c-n> <cr>
inoremap <c-j> <c-n> inoremap <c-j> <c-n>
cnoremap <c-j> <c-n> cnoremap <c-j> <c-n>
" half scroll up and down
noremap <C-A-p> <C-u>
noremap <C-A-u> <C-d>
map <C-d> <Nop>
nnoremap <SPACE> <Nop>
let g:mapleader = ' ' " jump word in visual mode -- TODO
" In insert or command mode, move normally by using Ctrl
inoremap <C-n> <Left>
inoremap <C-e> <Down>
inoremap <C-o> <Up>
inoremap <C-i> <Right>
cnoremap <C-n> <Left>
cnoremap <C-e> <Down>
cnoremap <C-o> <Up>
cnoremap <C-i> <Right>
inoremap <C-A-n> <C-Left>
inoremap <C-A-i> <C-Right>
inoremap <C-A-e> <Esc>:+3<CR>i
inoremap <C-A-o> <Esc>:-3<CR>i
" easy config " easy config
nmap <S-F9> :e $HOME/.vimrc<CR> nmap <S-F9> :e $HOME/.vimrc<CR>
@ -59,15 +97,22 @@ nmap <S-F10> :so $HOME/.vimrc<CR>
" Force saving files that require root permission " Force saving files that require root permission
command! SUDOwrite :execute 'w !sudo tee > /dev/null %' | edit! command! SUDOwrite :execute 'w !sudo tee > /dev/null %' | edit!
" TODO: C-S-o etc does not work
" Bubble single lines " Bubble single lines
nmap <silent> <C-S-Up> :m-2<CR>== nmap <silent> <C-S-Up> :m-2<CR>==
nmap <silent> <C-S-o> :m-2<CR>==
nmap <silent> <C-S-Down> :m+<CR>== nmap <silent> <C-S-Down> :m+<CR>==
nmap <silent> <C-S-e> :m+<CR>==
imap <silent> <C-S-Up> <Esc>:m-2<CR>==gi imap <silent> <C-S-Up> <Esc>:m-2<CR>==gi
imap <silent> <C-S-o> <Esc>:m-2<CR>==gi
imap <silent> <C-S-Down> <Esc>:m+<CR>==gi imap <silent> <C-S-Down> <Esc>:m+<CR>==gi
imap <silent> <C-S-e> <Esc>:m+<CR>==gi
" Bubble multiple lines " Bubble multiple lines
vmap <silent> <C-S-Up> :m-2<CR>gv=gv vmap <silent> <C-S-Up> :m-2<CR>gv=gv
vmap <silent> <C-S-o> :m-2<CR>gv=gv
vmap <silent> <C-S-Down> :m'>+<CR>gv=gv vmap <silent> <C-S-Down> :m'>+<CR>gv=gv
vmap <silent> <C-S-e> :m'>+<CR>gv=gv
" Indent lines using <Left> and <Right> " Indent lines using <Left> and <Right>
vmap <C-S-Right> >gv vmap <C-S-Right> >gv
@ -89,7 +134,7 @@ noremap <leader>wc <Esc>:bd<CR>
noremap <leader>bo <Esc>:Bufonly<CR> noremap <leader>bo <Esc>:Bufonly<CR>
" close preview " close preview
nmap <C-p> :pc<CR> nmap <leader>pc <Esc>:pc<CR>
" Remap window commands " Remap window commands
" map <leader>ws <Esc>:wincmd s<CR> " map <leader>ws <Esc>:wincmd s<CR>
@ -111,10 +156,15 @@ nmap <C-p> :pc<CR>
" map <C-h> <Esc>:wincmd h<CR> " map <C-h> <Esc>:wincmd h<CR>
" map <C-Right> <Esc>:wincmd l<CR> " map <C-Right> <Esc>:wincmd l<CR>
" map <C-l> <Esc>:wincmd l<CR> " map <C-l> <Esc>:wincmd l<CR>
nnoremap <silent> <A-o> :wincmd K<CR> "
nnoremap <silent> <A-e> :wincmd J<CR> " nnoremap <silent> <A-o> :wincmd k<CR>
nnoremap <silent> <A-n> :wincmd H<CR> " nnoremap <silent> <A-e> :wincmd j<CR>
nnoremap <silent> <A-i> :wincmd L<CR> " nnoremap <silent> <A-n> :wincmd h<CR>
" nnoremap <silent> <A-i> :wincmd l<CR>
" inoremap <silent> <A-o> <Esc>:wincmd k<CR>
" inoremap <silent> <A-e> <Esc>:wincmd j<CR>
" inoremap <silent> <A-n> <Esc>:wincmd h<CR>
" inoremap <silent> <A-i> <Esc>:wincmd l<CR>
nnoremap <silent> <A-Up> :wincmd k<CR> nnoremap <silent> <A-Up> :wincmd k<CR>
nnoremap <silent> <A-Down> :wincmd j<CR> nnoremap <silent> <A-Down> :wincmd j<CR>
nnoremap <silent> <A-Left> :wincmd h<CR> nnoremap <silent> <A-Left> :wincmd h<CR>
@ -123,6 +173,14 @@ inoremap <silent> <A-Up> <Esc>:wincmd k<CR>
inoremap <silent> <A-Down> <Esc>:wincmd j<CR> inoremap <silent> <A-Down> <Esc>:wincmd j<CR>
inoremap <silent> <A-Left> <Esc>:wincmd h<CR> inoremap <silent> <A-Left> <Esc>:wincmd h<CR>
inoremap <silent> <A-Right> <Esc>:wincmd l<CR> inoremap <silent> <A-Right> <Esc>:wincmd l<CR>
nnoremap <silent> <C-A-Up> :wincmd K<CR>
nnoremap <silent> <C-A-Down> :wincmd J<CR>
nnoremap <silent> <C-A-Left> :wincmd H<CR>
nnoremap <silent> <C-A-Right> :wincmd L<CR>
inoremap <silent> <C-A-Up> <Esc>:wincmd K<CR>
inoremap <silent> <C-A-Down> <Esc>:wincmd J<CR>
inoremap <silent> <C-A-Left> <Esc>:wincmd H<CR>
inoremap <silent> <C-A-Right> <Esc>:wincmd L<CR>
" tags " tags
nmap <S-F3> :exec("tjump ".expand("<cword>"))<CR> nmap <S-F3> :exec("tjump ".expand("<cword>"))<CR>
@ -146,30 +204,26 @@ inoremap <silent> <S-Insert> <ESC>:set paste<CR>"+p :set nopaste<CR>
nmap <silent> <S-F7> :setlocal spell! spelllang=en_us<CR> nmap <silent> <S-F7> :setlocal spell! spelllang=en_us<CR>
" cursor jump " cursor jump
nnoremap <C-A-Up> 3k " nnoremap <A-Up> 3k
inoremap <C-A-Up> <Esc>:-3<CR>i " inoremap <A-Up> <Esc>:-3<CR>i
vnoremap <C-A-Up> 3k " vnoremap <A-Up> 3k
nnoremap <C-A-Down> 3j " nnoremap <A-Down> 3j
inoremap <C-A-Down> <Esc>:+3<CR>i " inoremap <A-Down> <Esc>:+3<CR>i
vnoremap <C-A-Down> 3j " vnoremap <A-Down> 3j
nnoremap <C-Up> 6k " nnoremap <C-Up> 6k
inoremap <C-Up> <Esc>:-6<CR>i " inoremap <C-Up> <Esc>:-6<CR>i
vnoremap <C-Up> 6k " vnoremap <C-Up> 6k
nnoremap <C-Down> 6j " nnoremap <C-Down> 6j
inoremap <C-Down> <Esc>:+6<CR>i " inoremap <C-Down> <Esc>:+6<CR>i
vnoremap <C-Down> 6j " vnoremap <C-Down> 6j
nnoremap <C-A-o> 3k nnoremap <A-o> 3k
inoremap <C-A-o> <Esc>:-3<CR>i vnoremap <A-o> 3k
vnoremap <C-A-o> 3k nnoremap <A-e> 3j
nnoremap <C-A-e> 3j vnoremap <A-e> 3j
inoremap <C-A-e> <Esc>:+3<CR>i
vnoremap <C-A-e> 3j
nnoremap <C-o> 6k nnoremap <C-o> 6k
inoremap <C-o> <Esc>:-6<CR>i
vnoremap <C-o> 6k vnoremap <C-o> 6k
nnoremap <C-e> 6j nnoremap <C-e> 6j
inoremap <C-e> <Esc>:+6<CR>i
vnoremap <C-e> 6j vnoremap <C-e> 6j
" scrolling " scrolling
@ -180,6 +234,14 @@ nnoremap <S-PageDown> 10<C-E>
inoremap <S-PageDown> <Esc>10<C-E>i inoremap <S-PageDown> <Esc>10<C-E>i
vnoremap <S-PageDown> 10<C-E> vnoremap <S-PageDown> 10<C-E>
nnoremap <C-p> 10<C-Y>
inoremap <C-p> <Esc>10<C-Y>i
vnoremap <C-p> 10<C-Y>
nnoremap <C-u> 10<C-E>
inoremap <C-u> <Esc>10<C-E>i
vnoremap <C-u> 10<C-E>
" F keys " F keys
nmap <F2> :noh<CR> nmap <F2> :noh<CR>
imap <F2> <C-O>:noh<CR> imap <F2> <C-O>:noh<CR>
@ -199,7 +261,7 @@ noremap <C-B> :TagbarToggle<CR>
inoremap <C-B> <C-O>:TagbarToggle<CR> inoremap <C-B> <C-O>:TagbarToggle<CR>
" remap visual block " remap visual block
nnoremap <S-B> <c-v> nnoremap <S-C> <c-v>
" write " write
noremap <C-s> :w<CR> noremap <C-s> :w<CR>
@ -224,6 +286,46 @@ nnoremap <leader>tg :call fzf#vim#tags(expand('<cword>'), {'options': '--exact -
" gitgutter " gitgutter
nmap <leader>ggt <Esc>:GitGutterToggle<CR> nmap <leader>ggt <Esc>:GitGutterToggle<CR>
nmap <leader>nh <Plug>GitGutterNextHunk nmap <leader>nh <Plug>(GitGutterNextHunk)
nmap <leader>bh <Plug>GitGutterPrevHunk nmap <leader>bh <Plug>(GitGutterPrevHunk)
" ctrlp
let g:ctrlp_prompt_mappings = {
\ 'PrtBS()': ['<bs>', '<c-]>'],
\ 'PrtDelete()': ['<del>'],
\ 'PrtDeleteWord()': ['<c-w>'],
\ 'PrtClear()': ['<c-u>'],
\ 'PrtSelectMove("j")': ['<c-e>', '<down>'],
\ 'PrtSelectMove("k")': ['<c-o>', '<up>'],
\ 'PrtSelectMove("t")': ['<Home>', '<kHome>'],
\ 'PrtSelectMove("b")': ['<End>', '<kEnd>'],
\ 'PrtSelectMove("u")': ['<PageUp>', '<kPageUp>'],
\ 'PrtSelectMove("d")': ['<PageDown>', '<kPageDown>'],
\ 'PrtHistory(-1)': ['<c-f>'],
\ 'PrtHistory(1)': ['<c-p>'],
\ 'AcceptSelection("e")': ['<cr>', '<2-LeftMouse>'],
\ 'AcceptSelection("h")': ['<c-x>', '<c-cr>', '<c-s>'],
\ 'AcceptSelection("t")': ['<c-t>'],
\ 'AcceptSelection("v")': ['<c-v>', '<RightMouse>'],
\ 'ToggleFocus()': ['<s-tab>'],
\ 'ToggleRegex()': ['<c-r>'],
\ 'ToggleByFname()': ['<c-d>'],
\ 'ToggleType(1)': ['<c-g>', '<c-up>'],
\ 'ToggleType(-1)': ['<c-b>', '<c-down>'],
\ 'PrtExpandDir()': ['<tab>'],
\ 'PrtInsert("c")': ['<MiddleMouse>', '<insert>'],
\ 'PrtInsert()': ['<c-\>'],
\ 'PrtCurStart()': ['<c-a>'],
\ 'PrtCurEnd()': ['<c-k>'],
\ 'PrtCurLeft()': ['<c-n>', '<left>', '<c-^>'],
\ 'PrtCurRight()': ['<c-i>', '<right>'],
\ 'PrtClearCache()': ['<F5>'],
\ 'PrtDeleteEnt()': ['<F7>'],
\ 'CreateNewFile()': ['<c-y>'],
\ 'MarkToOpen()': ['<c-z>'],
\ 'OpenMulti()': ['<c-l>'],
\ 'PrtExit()': ['<esc>', '<c-c>', '<c-g>'],
\ }
nnoremap <leader>cd :cd %:p:h<CR>:pwd<CR>

View File

@ -0,0 +1 @@
Saleem Abdulrasool <compnerd@exherbo.org> compnerd <compnerd@lithium.(none)>

View File

@ -0,0 +1,40 @@
COPYRIGHT
=========
Copyright (c) 2008 Alexander Færøy <ahf@exherbo.org>
You may redistribute this package under the same terms as Vim itself.
Based in part upon gentoo-syntax, which is:
Copyright (c) 2004-2005 Ciaran McCreesh, Aaron Walker
INSTALL
=======
If you are on an Exherbo-based system:
cave resolve app-vim/exheres-syntax
If you are on a Gentoo-based system:
cave resolve app-vim/exheres-syntax
or
emerge app-vim/exheres-syntax
Other:
Just extract the tarball to your ~/.vim/ directory.
BUGS
====
If you discover any bugs in exheres-syntax, please file a bug under the
"Hosted Projects" -> "Exheres-syntax" component on https://bugs.exherbo.org/
AUTHORS
=======
* Alexander Færøy <ahf@exherbo.org>
* Ingmar Vanhassel <ingmar@exherbo.org>
* Saleem Abdulrasool <compnerd@compnerd.org>

View File

@ -0,0 +1,13 @@
*exheres-syntax.txt* Exheres Syntax Plug-in
Author: Alexander Færøy <ahf@exherbo.org>
Copyright: (c) 2007 by Alexander Færøy
==============================================================================
Please read http://www.exherbo.org/docs/exheres-for-smarties.html for
information about the exheres package format.
==============================================================================
vim:tw=78:ts=4:ft=help:et

View File

@ -0,0 +1 @@
exheres-syntax.txt exheres-syntax.txt /*exheres-syntax.txt*

View File

@ -0,0 +1,14 @@
" Vim filetype detection file
" Language: Exheres
" Author: Alexander Færøy <ahf@exherbo.org>
" Copyright: Copyright (c) 2008 Alexander Færøy
" License: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
au BufNewFile,BufRead *.exlib set filetype=exlib
au BufNewFile,BufRead *.exheres-0 set filetype=exheres-0
" vim: set et ts=4 :

View File

@ -0,0 +1,19 @@
" Vim filetype plugin file
" Language: Exheres-0
" Author: Alexander Færøy <ahf@exherbo.org>
" Copyright: Copyright (c) 2008, 2009 Alexander Færøy
" License: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
runtime! ftplugin/sh.vim
setlocal tabstop=4
setlocal shiftwidth=4
setlocal expandtab
setlocal fileencoding=utf-8
setlocal textwidth=100
" vim: set et ts=4 :

View File

@ -0,0 +1,19 @@
" Vim filetype plugin file
" Language: Exlib
" Author: Alexander Færøy <ahf@exherbo.org>
" Copyright: Copyright (c) 2008, 2009 Alexander Færøy
" License: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
runtime! ftplugin/sh.vim
setlocal tabstop=4
setlocal shiftwidth=4
setlocal expandtab
setlocal fileencoding=utf-8
setlocal textwidth=100
" vim: set et ts=4 :

View File

@ -0,0 +1,18 @@
" Vim indent file
" Language: Exheres-0
" Author: Alexander Færøy <ahf@exherbo.org>
" Copyright: Copyright (c) 2008 Alexander Færøy
" License: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
if exists("b:did_indent")
finish
endif
runtime! indent/sh.vim
let b:did_indent = 1
" vim: set et ts=4 :

View File

@ -0,0 +1,18 @@
" Vim indent file
" Language: Exlib
" Author: Alexander Færøy <ahf@exherbo.org>
" Copyright: Copyright (c) 2008 Alexander Færøy
" License: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
if exists("b:did_indent")
finish
endif
runtime! indent/sh.vim
let b:did_indent = 1
" vim: set et ts=4 :

View File

@ -0,0 +1,89 @@
" Vim plugin
" Language: Create new common-metadata.exlib
" Author: Saleem Abdulrasool <compnerd@compnerd.org>
" Copyright: Copyright (c) 2008-2012 Saleem Abdulrasool <compnerd@compnerd.org>
" License: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
fun! <SID>GenerateCommonMetadataExlib()
let l:pastebackup = &paste
set nopaste
if exists("*strftime")
let l:year = strftime("%Y")
else
let l:year = "<year>"
endif
put = '# Copyright ' . l:year . ' ' . g:exheres_author_name
put = '# Distributed under the terms of the GNU General Public License v2'
put = ''
put = 'SUMMARY=\"\"'
put = 'DESCRIPTION=\"'
put = 'If DESCRIPTION is set it must not be an empty string.'
put = '\"'
put = 'HOMEPAGE=\"\"'
put = 'DOWNLOADS=\"\"'
put = ''
put = 'LICENCES=\"\"'
put = 'SLOT=\"0\"'
put = 'MYOPTIONS=\"\"'
put = ''
put = 'DEPENDENCIES=\"'
put = ' build:'
put = ' build+run:'
put = '\"'
put = ''
put = 'BUGS_TO=\"\"'
put = ''
put = 'REMOTE_IDS=\"\"'
put = ''
put = 'UPSTREAM_CHANGELOG=\"\"'
put = 'UPSTREAM_DOCUMENTATION=\"\"'
put = 'UPSTREAM_RELEASE_NOTES=\"\"'
put = ''
0
/^SUMMARY=/
exec "normal 2f\""
nohls
if pastebackup != 0
set paste
endif
endfun
com! -nargs=0 NewCommonMetadataExlib call <SID>GenerateCommonMetadataExlib
if !exists("g:common_metadata_create_on_empty")
let g:common_metadata_create_on_empty = 1
endif
if v:progname =~ "vimdiff"
let g:common_metadata_create_on_empty = 0
endif
if !exists("g:exheres_author_name")
let g:exheres_author_name = "<name>"
endif
augroup NewCommonMetadataExlib
au!
" common-metadata.exlib
autocmd BufNewFile common-metadata.exlib
\ if g:common_metadata_create_on_empty |
\ call <SID>GenerateCommonMetadataExlib() |
\ endif
" ${PN}.exlib
autocmd BufNewFile *.exlib
\ if expand('%:p:t') == expand('%:p:h:t') . '.exlib' |
\ if g:common_metadata_create_on_empty |
\ call <SID>GenerateCommonMetadataExlib() |
\ endif |
\ endif
augroup END
" vim: set et ts=4 sw=4 :

View File

@ -0,0 +1,80 @@
" Vim plugin
" Language: Create new exheres-0 package.
" Author: Alexander Færøy <ahf@exherbo.org>
" Copyright: Copyright (c) 2007 Alexander Færøy
" License: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
fun! <SID>GenerateExheresZeroPackage()
let l:pastebackup = &paste
set nopaste
if exists("*strftime")
let l:year = strftime("%Y")
else
let l:year = "<year>"
endif
put! ='# Copyright ' . l:year . ' ' . g:exheres_author_name
put ='# Distributed under the terms of the GNU General Public License v2'
put =''
put ='SUMMARY=\"\"'
put ='DESCRIPTION=\"'
put ='If DESCRIPTION is set it must not be an empty string.'
put ='\"'
put ='HOMEPAGE=\"\"'
put ='DOWNLOADS=\"\"'
put =''
put ='LICENCES=\"\"'
put ='SLOT=\"0\"'
put ='PLATFORMS=\"\"'
put ='MYOPTIONS=\"\"'
put =''
put ='DEPENDENCIES=\"'
put =' build:'
put =' build+run:'
put ='\"'
put =''
put ='BUGS_TO=\"\"'
put =''
put ='DEFAULT_SRC_CONFIGURE_PARAMS=( )'
put ='DEFAULT_SRC_CONFIGURE_OPTION_WITHS=( )'
put ='DEFAULT_SRC_CONFIGURE_OPTION_ENABLES=( )'
put =''
0
/^SUMMARY=/
exec "normal 2f\""
nohls
if pastebackup == 0
set nopaste
endif
endfun
com! -nargs=0 NewExheresZeroPackage call <SID>GenerateExheresZeroPackage()
if !exists("g:package_create_on_empty")
let g:package_create_on_empty = 1
endif
if v:progname =~ "vimdiff"
let g:package_create_on_empty = 0
endif
if !exists("g:exheres_author_name")
let g:exheres_author_name = "<name>"
endif
augroup NewExheresZeroPackage
au!
autocmd BufNewFile *.exheres-0
\ if g:package_create_on_empty |
\ call <SID>GenerateExheresZeroPackage() |
\ endif
augroup END
" vim: set et ts=4 :

View File

@ -0,0 +1,18 @@
" Vim syntaxfile
" Language: Exheres-0
" Author: Alexander Færøy <ahf@exherbo.org>
" Copyright: Copyright (c) 2008 Alexander Færøy
" License: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
syn keyword ExheresZeroError export_exlib_phases
syn keyword ExheresZeroError myexparam exparam
runtime syntax/exheres-common.vim
let b:current_syntax = "exheres-0"
" vim: set et ts=4 :

View File

@ -0,0 +1,142 @@
" Vim syntaxfile
" Language: Common code for exheres syntax
" Author: Alexander Færøy <ahf@exherbo.org>
" Copyright: Copyright (c) 2008 Alexander Færøy
" License: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
let is_bash = 1
runtime! syntax/sh.vim
unlet b:current_syntax
syn region ExheresHeader contained start=/^#/ end=/$/ contains=ExheresCopyrightHeader
syn region ExheresHeaderBlock start=/\%^\(#\)\@=/ end=/^$/ contains=ExheresHeader
" Unfilled copyright notice
syn region ExheresCopyrightHeader contained start=/^#\s*Copyright/ end=/$/ contains=ExheresCopyrightError
syn match ExheresCopyrightError contained /<\(name\|year\)>/
" Phases
syn keyword ExheresZeroFunctions pkg_pretend pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm pkg_nofetch pkg_config pkg_info
syn keyword ExheresZeroFunctions src_fetch_extra src_unpack src_prepare src_configure src_compile src_test src_test_expensive src_install
" Default phases
syn keyword ExheresZeroFunctions default
syn keyword ExheresZeroFunctions default_pkg_pretend default_pkg_setup default_pkg_preinst default_pkg_postinst default_pkg_prerm default_pkg_postrm default_pkg_nofetch default_pkg_config default_pkg_info
syn keyword ExheresZeroFunctions default_src_fetch_extra default_src_unpack default_src_prepare default_src_configure default_src_compile default_src_test default_src_test_expensive default_src_install
" Multibuild phases
syn keyword ExheresZeroFunctions compile_one_multibuild compile_prepare_one_multibuild configure_one_multibuild configure_prepare_one_multibuild install_one_multibuild install_prepare_one_multibuild prepare_one_multibuild prepare_prepare_one_multibuild test_expensive_one_multibuild test_expensive_prepare_one_multibuild test_one_multibuild test_prepare_one_multibuild unpack_one_multibuild unpack_prepare_one_multibuild
" die_functions.bash
syn keyword ExheresZeroCoreKeyword die assert nonfatal
" echo_functions.bash
syn keyword ExheresZeroCoreKeyword einfo elog ewarn eerror ebegin eend
syn keyword ExheresZeroCoreKeyword einfon ewend
" install_functions.bash
syn keyword ExheresZeroCoreKeyword keepdir into insinto exeinto docinto insopts diropts exeopts libopts
" kernel_functions.bash
syn keyword ExheresZeroCoreKeyword KV_major KV_minor KV_micro KV_to_int get_KV
" sydbox.bash
syn keyword ExheresZeroCoreKeyword esandbox
syn match ExheresZeroError "sydboxcheck"
syn match ExheresZeroError "sydboxcmd"
syn match ExheresZeroError "addread"
syn match ExheresZeroError "adddeny"
syn match ExheresZeroError "addpredict"
" exheres-0/build_functions.bash
syn keyword ExheresZeroCoreKeyword expatch econf emagicdocs edo exhost
" exheres-0/conditional_functions.bash
syn keyword ExheresZeroCoreKeyword option_with option_enable
syn keyword ExheresZeroError use_with use_enable
" exheres-0/exlib_functions.bash
syn keyword ExheresZeroRequire require
" exheres-0/list_functions.bash
syn keyword ExheresZeroError einstall use usev useq
syn keyword ExheresZeroCoreKeyword optionfmt option optionv optionq has hasv hasq
syn keyword ExheresZeroCoreKeyword expecting_tests
" exheres-0/portage_stubs.bash
syn keyword ExheresZeroCoreKeyword has_version best_version
syn keyword ExheresZeroError portageq vdb_path check_KV debug-print debug-print-function debug-print-section
" utils/
syn keyword ExheresZeroCoreKeyword dobin doconfd dodir doenvd doexe doinfo
syn keyword ExheresZeroCoreKeyword doinitd doins dolib dolib.a dolib.so doman domo dosym
syn keyword ExheresZeroCoreKeyword newbin newconfd newdoc newenvd newexe newinitd newins newlib.a newlib.so
syn keyword ExheresZeroCoreKeyword newman unpack
syn keyword ExheresZeroCoreKeyword herebin hereconfd hereenvd hereinitd hereins
syn keyword ExheresZeroError dosbin fperms fowners newsbin heresbin
" utils/exheres-0/
syn keyword ExheresZeroCoreKeyword emake dodoc
syn keyword ExheresZeroError dohard donewins dosed doset dohtml
syn keyword ExheresZeroError prepall prepalldocs prepallinfo prepallman prepallstrip prepdocs prepinfo prepman prepstrip
syn match ExheresZeroError /ecompress\w*/
" autotools.exlib
syn keyword ExheresZeroCoreKeyword eautoreconf eaclocal eautoconf eautoheader eautomake
" Legacy ebuild stuff
syn match ExheresZeroError /^SOURCES/
syn match ExheresZeroError /^DISTDIR/
syn match ExheresZeroError /^FILESDIR/
syn match ExheresZeroError /^PORTDIR/
syn match ExheresZeroError /^WORKDIR/
syn match ExheresZeroError /^KEYWORDS/
syn match ExheresZeroError /^PROVIDE/
syn match ExheresZeroError /^IUSE/
syn match ExheresZeroError /^LICENSE/
syn match ExheresZeroError /^LICENCE[^S]/
syn match ExheresZeroError /^SRC_URI/
syn match ExheresZeroError /^EAPI/
syn match ExheresZeroError /AA/
syn match ExheresZeroError /ARCH/
syn match ExheresZeroError /KV/
syn match ExheresZeroError /^\(A\|D\|S\|T\)=/
syn match ExheresZeroErrorC /\${\(P\|PF\|A\|D\|S\|T\)}/
syn match ExheresZeroErrorC /\${\(DISTDIR\|FILESDIR\|PORTDIR\|SOURCES\|WORKDIR\)}/
" Read-only variables
syn match ExheresZeroError /^\(PNV\|PN\|PV\|PR\|PVR\|PNVR\|ARCHIVES\)=/
" Bad variable assignments
syn match ExheresZeroError /^SLOT\s*=\s*\(""\|''\|$\)/
syn match ExheresZeroError ~^WORK="\?\${\?WORKBASE}\?/\${\?PNV}\?"\?\s*$~
syn match ExheresZeroErrorC /\${PN}-\${PV}/
" Highlight tabs and trailing whitespace as errors
syn match ExheresZeroError " "
syn match ExheresZeroError "\s\+$"
" Highlight last line if it's not empty
syn match ExheresZeroError /^.\+\%$/
" Highlight it
syn cluster ExheresZeroContents contains=ExheresZeroCoreKeyword,ExheresZeroFunctions,ExheresZeroRequire
syn cluster ExheresZeroContents add=ExheresZeroError,ExheresZeroErrorC
syn cluster shCommandSubList add=@ExheresZeroContents
syn cluster shDblQuoteList add=ExheresZeroErrorC
hi def link ExheresZeroCoreKeyword Keyword
hi def link ExheresZeroFunctions Special
hi def link ExheresZeroRequire Include
hi def link ExheresZeroError Error
hi def link ExheresZeroErrorC Error
hi def link ExheresHeader Comment
hi def link ExheresCopyrightHeader Comment
hi def link ExheresCopyrightError Error
" vim: set et ts=4 :

View File

@ -0,0 +1,18 @@
" Vim syntaxfile
" Language: Exheres-0
" Author: Alexander Færøy <ahf@exherbo.org>
" Copyright: Copyright (c) 2008 Alexander Færøy
" License: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
syn keyword ExheresZeroRequire export_exlib_phases
syn keyword ExheresZeroRequire myexparam exparam
runtime syntax/exheres-common.vim
let b:current_syntax = "exlib"
" vim: set et ts=4 :

33
vimrc
View File

@ -7,7 +7,10 @@ set shortmess+=A
filetype plugin on filetype plugin on
filetype indent on filetype indent on
set backspace=2 " make backspace work like most other programs
set cmdheight=1
let g:ctrlp_map = '<c-j>'
" vim-plug settings (Plugin declaration) " vim-plug settings (Plugin declaration)
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
@ -31,19 +34,21 @@ Plug 'xolox/vim-misc'
Plug 'nathanaelkane/vim-indent-guides' Plug 'nathanaelkane/vim-indent-guides'
Plug 'Shougo/vimproc.vim', {'do' : 'make'} Plug 'Shougo/vimproc.vim', {'do' : 'make'}
Plug 'sjbach/lusty' Plug 'sjbach/lusty'
Plug 'vim-airline/vim-airline' " Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes' " Plug 'vim-airline/vim-airline-themes'
Plug 'kien/ctrlp.vim' Plug 'kien/ctrlp.vim'
Plug 'nixprime/cpsm', { 'do': 'PY3=ON ./install.sh' } Plug 'nixprime/cpsm', { 'do': 'PY3=ON ./install.sh' }
Plug 'junegunn/fzf', { 'do': './install --bin' } Plug 'junegunn/fzf', { 'do': './install --bin' }
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
Plug 'sbdchd/neoformat' Plug 'sbdchd/neoformat'
Plug 'AndrewRadev/bufferize.vim' Plug 'AndrewRadev/bufferize.vim'
Plug 'vimwiki/vimwiki' " Plug 'vimwiki/vimwiki'
Plug 'vmchale/dhall-vim' Plug 'vmchale/dhall-vim'
Plug 'Shougo/echodoc.vim' Plug 'Shougo/echodoc.vim'
Plug 'tpope/vim-scriptease' Plug 'tpope/vim-scriptease'
Plug 'Konfekt/FastFold' Plug 'Konfekt/FastFold'
" Plug 'lambdalisue/vim-fullscreen'
Plug 'editorconfig/editorconfig-vim'
" scm " scm
@ -95,7 +100,7 @@ Plug 'w0rp/ale', {
" Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' } " Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' }
" completion based on ghc-mod, not LSP " completion based on ghc-mod, not LSP
" Plug 'eagletmt/neco-ghc', { 'for': 'haskell' } " Plug 'eagletmt/neco-ghc', { 'for': 'haskell' }
Plug 'lukerandall/haskellmode-vim', { 'for': 'haskell' } " Plug 'lukerandall/haskellmode-vim', { 'for': 'haskell' }
Plug 'neovimhaskell/haskell-vim', { 'for': ['haskell', 'cabal']} Plug 'neovimhaskell/haskell-vim', { 'for': ['haskell', 'cabal']}
" Plug 'ucsd-progsys/liquid-types.vim', { 'for': 'haskell' } " Plug 'ucsd-progsys/liquid-types.vim', { 'for': 'haskell' }
Plug 'bitc/lushtags', { Plug 'bitc/lushtags', {
@ -103,9 +108,10 @@ Plug 'bitc/lushtags', {
\ 'for': 'haskell', \ 'for': 'haskell',
\ } \ }
" Plug 'timmytofu/vim-cabal-context', { 'for': 'haskell' } " Plug 'timmytofu/vim-cabal-context', { 'for': 'haskell' }
Plug 'itchyny/vim-haskell-indent', { 'for': 'haskell' } " Plug 'itchyny/vim-haskell-indent', { 'for': 'haskell' }
Plug 'dan-t/vim-hsimport', { 'for': 'haskell' } " Plug 'dan-t/vim-hsimport', { 'for': 'haskell' }
Plug 'Twinside/vim-hoogle', { 'for': 'haskell' } Plug 'Twinside/vim-hoogle', { 'for': 'haskell' }
" Plug 'axelf4/vim-haskell', { 'for': 'haskell' }
Plug 'luochen1990/rainbow', { 'for': ['clojure', 'haskell', 'python'] } Plug 'luochen1990/rainbow', { 'for': ['clojure', 'haskell', 'python'] }
@ -162,6 +168,7 @@ Plug '~/.vim/unmanaged-vim-plug/L9'
Plug '~/.vim/unmanaged-vim-plug/log' Plug '~/.vim/unmanaged-vim-plug/log'
Plug '~/.vim/unmanaged-vim-plug/ScrollColor' Plug '~/.vim/unmanaged-vim-plug/ScrollColor'
Plug '~/.vim/unmanaged-vim-plug/txtfmt' Plug '~/.vim/unmanaged-vim-plug/txtfmt'
Plug '~/.vim/unmanaged-vim-plug/exheres-syntax-20160115'
if !has('nvim') if !has('nvim')
Plug '~/.vim/unmanaged-vim-plug/fontzoom' Plug '~/.vim/unmanaged-vim-plug/fontzoom'
endif endif
@ -197,6 +204,13 @@ call CmdAlias('LS', 'LanguageClientStart')
" global settings " global settings
if has('gui_running')
set guioptions -=T
set winaltkeys=no
set guiheadroom=0
else
set termguicolors
endif
set foldmethod=syntax "fold based on indent set foldmethod=syntax "fold based on indent
set foldnestmax=10 "deepest fold is 10 levels set foldnestmax=10 "deepest fold is 10 levels
set nofoldenable "dont fold by default set nofoldenable "dont fold by default
@ -241,14 +255,9 @@ autocmd ColorScheme * highlight! link SignColumn LineNr
" ==========colors=========== " ==========colors===========
" set t_Co=256 " set t_Co=256
"let g:solarized_termcolors=256 let g:solarized_termcolors=256
if has('gui_running')
set background=dark set background=dark
colorscheme solarized colorscheme solarized
else
set background=dark
colorscheme solarized
endif
if has('nvim') if has('nvim')
if exists('g:GtkGuiLoaded') if exists('g:GtkGuiLoaded')