From 8143c60b211956dfe206e9d4927902abb3e6ea2d Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 22 Aug 2020 20:37:20 +0200 Subject: [PATCH] Update --- after/ftplugin/haskell.vim | 42 ++++- after/plugin/plugin_settings.vim | 18 +- plugin/keys.vim | 170 ++++++++++++++---- .../exheres-syntax-20160115/.mailmap | 1 + .../exheres-syntax-20160115/README | 40 +++++ .../doc/exheres-syntax.txt | 13 ++ .../exheres-syntax-20160115/doc/tags | 1 + .../ftdetect/exheres.vim | 14 ++ .../ftplugin/exheres-0.vim | 19 ++ .../ftplugin/exlib.vim | 19 ++ .../indent/exheres-0.vim | 18 ++ .../exheres-syntax-20160115/indent/exlib.vim | 18 ++ .../plugin/new-common-metadata.vim | 89 +++++++++ .../plugin/new-exheres-0.vim | 80 +++++++++ .../syntax/exheres-0.vim | 18 ++ .../syntax/exheres-common.vim | 142 +++++++++++++++ .../exheres-syntax-20160115/syntax/exlib.vim | 18 ++ vimrc | 41 +++-- 18 files changed, 708 insertions(+), 53 deletions(-) create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/.mailmap create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/README create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/doc/exheres-syntax.txt create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/doc/tags create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/ftdetect/exheres.vim create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/ftplugin/exheres-0.vim create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/ftplugin/exlib.vim create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/indent/exheres-0.vim create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/indent/exlib.vim create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/plugin/new-common-metadata.vim create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/plugin/new-exheres-0.vim create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/syntax/exheres-0.vim create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/syntax/exheres-common.vim create mode 100644 unmanaged-vim-plug/exheres-syntax-20160115/syntax/exlib.vim diff --git a/after/ftplugin/haskell.vim b/after/ftplugin/haskell.vim index 0fb639a..4ec554b 100644 --- a/after/ftplugin/haskell.vim +++ b/after/ftplugin/haskell.vim @@ -49,7 +49,7 @@ nnoremap hc :HoogleClose " haskell-vim 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_recursivedo = 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_case = 5 " 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_in = 1 +let g:haskell_disable_TH = 1 " haskellmode-vim @@ -209,3 +210,40 @@ call deoplete#custom#source('LanguageClient', \ 'min_pattern_length', \ 2) inoremap pumvisible() ? "\" : "\" + + +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' + \ } +\ } + diff --git a/after/plugin/plugin_settings.vim b/after/plugin/plugin_settings.vim index 2c47f2d..606a4d0 100644 --- a/after/plugin/plugin_settings.vim +++ b/after/plugin/plugin_settings.vim @@ -1,5 +1,5 @@ " echodoc -set cmdheight=2 +" set cmdheight=2 let g:echodoc#enable_at_startup = 1 let g:echodoc#type = 'signature' @@ -198,3 +198,19 @@ let g:perl_fold_blocks = 1 let g:r_syntax_folding = 1 let g:rust_fold = 1 let g:haskell_fold = 1 + +" tagbar +let g:tagbar_map_togglefold = ['za'] +let g:tagbar_map_togglecaseinsensitive = 'zi' + +" Nerdtree +let g:NERDTreeMapActivateNode = '' +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 + + diff --git a/plugin/keys.vim b/plugin/keys.vim index e415b34..3048741 100644 --- a/plugin/keys.vim +++ b/plugin/keys.vim @@ -1,4 +1,14 @@ +nnoremap +let g:mapleader = ' ' + +" Quickly insert an empty new line without entering insert mode +nnoremap o o +nnoremap O O + " workman +noremap +noremap + noremap e j noremap o k noremap n h @@ -39,18 +49,46 @@ nnoremap i :wincmd l nnoremap k :wincmd n nnoremap l :wincmd o -nnoremap b -nnoremap e +vnoremap B +vnoremap W +nnoremap B +nnoremap W + +vnoremap b +vnoremap w +nnoremap b +nnoremap w +" nnoremap i e " get control-j back, so switch it with ctrl-n at qwerty position of j -imap -cmap +" imap +" cmap inoremap cnoremap +" half scroll up and down +noremap +noremap +map -nnoremap -let g:mapleader = ' ' + +" jump word in visual mode -- TODO + +" In insert or command mode, move normally by using Ctrl +inoremap +inoremap +inoremap +inoremap +cnoremap +cnoremap +cnoremap +cnoremap + +inoremap +inoremap + +inoremap :+3i +inoremap :-3i " easy config nmap :e $HOME/.vimrc @@ -59,15 +97,22 @@ nmap :so $HOME/.vimrc " Force saving files that require root permission command! SUDOwrite :execute 'w !sudo tee > /dev/null %' | edit! +" TODO: C-S-o etc does not work " Bubble single lines nmap :m-2== +nmap :m-2== nmap :m+== +nmap :m+== imap :m-2==gi +imap :m-2==gi imap :m+==gi +imap :m+==gi " Bubble multiple lines vmap :m-2gv=gv +vmap :m-2gv=gv vmap :m'>+gv=gv +vmap :m'>+gv=gv " Indent lines using and vmap >gv @@ -89,7 +134,7 @@ noremap wc :bd noremap bo :Bufonly " close preview -nmap :pc +nmap pc :pc " Remap window commands " map ws :wincmd s @@ -111,10 +156,15 @@ nmap :pc " map :wincmd h " map :wincmd l " map :wincmd l -nnoremap :wincmd K -nnoremap :wincmd J -nnoremap :wincmd H -nnoremap :wincmd L +" +" nnoremap :wincmd k +" nnoremap :wincmd j +" nnoremap :wincmd h +" nnoremap :wincmd l +" inoremap :wincmd k +" inoremap :wincmd j +" inoremap :wincmd h +" inoremap :wincmd l nnoremap :wincmd k nnoremap :wincmd j nnoremap :wincmd h @@ -123,6 +173,14 @@ inoremap :wincmd k inoremap :wincmd j inoremap :wincmd h inoremap :wincmd l +nnoremap :wincmd K +nnoremap :wincmd J +nnoremap :wincmd H +nnoremap :wincmd L +inoremap :wincmd K +inoremap :wincmd J +inoremap :wincmd H +inoremap :wincmd L " tags nmap :exec("tjump ".expand("")) @@ -146,30 +204,26 @@ inoremap :set paste"+p :set nopaste nmap :setlocal spell! spelllang=en_us " cursor jump -nnoremap 3k -inoremap :-3i -vnoremap 3k -nnoremap 3j -inoremap :+3i -vnoremap 3j -nnoremap 6k -inoremap :-6i -vnoremap 6k -nnoremap 6j -inoremap :+6i -vnoremap 6j +" nnoremap 3k +" inoremap :-3i +" vnoremap 3k +" nnoremap 3j +" inoremap :+3i +" vnoremap 3j +" nnoremap 6k +" inoremap :-6i +" vnoremap 6k +" nnoremap 6j +" inoremap :+6i +" vnoremap 6j -nnoremap 3k -inoremap :-3i -vnoremap 3k -nnoremap 3j -inoremap :+3i -vnoremap 3j +nnoremap 3k +vnoremap 3k +nnoremap 3j +vnoremap 3j nnoremap 6k -inoremap :-6i vnoremap 6k nnoremap 6j -inoremap :+6i vnoremap 6j " scrolling @@ -180,6 +234,14 @@ nnoremap 10 inoremap 10i vnoremap 10 +nnoremap 10 +inoremap 10i +vnoremap 10 +nnoremap 10 +inoremap 10i +vnoremap 10 + + " F keys nmap :noh imap :noh @@ -199,7 +261,7 @@ noremap :TagbarToggle inoremap :TagbarToggle " remap visual block -nnoremap +nnoremap " write noremap :w @@ -224,6 +286,46 @@ nnoremap tg :call fzf#vim#tags(expand(''), {'options': '--exact - " gitgutter nmap ggt :GitGutterToggle -nmap nh GitGutterNextHunk -nmap bh GitGutterPrevHunk +nmap nh (GitGutterNextHunk) +nmap bh (GitGutterPrevHunk) +" ctrlp + let g:ctrlp_prompt_mappings = { + \ 'PrtBS()': ['', ''], + \ 'PrtDelete()': [''], + \ 'PrtDeleteWord()': [''], + \ 'PrtClear()': [''], + \ 'PrtSelectMove("j")': ['', ''], + \ 'PrtSelectMove("k")': ['', ''], + \ 'PrtSelectMove("t")': ['', ''], + \ 'PrtSelectMove("b")': ['', ''], + \ 'PrtSelectMove("u")': ['', ''], + \ 'PrtSelectMove("d")': ['', ''], + \ 'PrtHistory(-1)': [''], + \ 'PrtHistory(1)': [''], + \ 'AcceptSelection("e")': ['', '<2-LeftMouse>'], + \ 'AcceptSelection("h")': ['', '', ''], + \ 'AcceptSelection("t")': [''], + \ 'AcceptSelection("v")': ['', ''], + \ 'ToggleFocus()': [''], + \ 'ToggleRegex()': [''], + \ 'ToggleByFname()': [''], + \ 'ToggleType(1)': ['', ''], + \ 'ToggleType(-1)': ['', ''], + \ 'PrtExpandDir()': [''], + \ 'PrtInsert("c")': ['', ''], + \ 'PrtInsert()': [''], + \ 'PrtCurStart()': [''], + \ 'PrtCurEnd()': [''], + \ 'PrtCurLeft()': ['', '', ''], + \ 'PrtCurRight()': ['', ''], + \ 'PrtClearCache()': [''], + \ 'PrtDeleteEnt()': [''], + \ 'CreateNewFile()': [''], + \ 'MarkToOpen()': [''], + \ 'OpenMulti()': [''], + \ 'PrtExit()': ['', '', ''], + \ } + + +nnoremap cd :cd %:p:h:pwd diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/.mailmap b/unmanaged-vim-plug/exheres-syntax-20160115/.mailmap new file mode 100644 index 0000000..e824bff --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/.mailmap @@ -0,0 +1 @@ +Saleem Abdulrasool compnerd diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/README b/unmanaged-vim-plug/exheres-syntax-20160115/README new file mode 100644 index 0000000..745a767 --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/README @@ -0,0 +1,40 @@ +COPYRIGHT +========= + +Copyright (c) 2008 Alexander Færøy +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 + * Ingmar Vanhassel + * Saleem Abdulrasool diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/doc/exheres-syntax.txt b/unmanaged-vim-plug/exheres-syntax-20160115/doc/exheres-syntax.txt new file mode 100644 index 0000000..8368c36 --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/doc/exheres-syntax.txt @@ -0,0 +1,13 @@ +*exheres-syntax.txt* Exheres Syntax Plug-in + +Author: Alexander Færøy + +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 diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/doc/tags b/unmanaged-vim-plug/exheres-syntax-20160115/doc/tags new file mode 100644 index 0000000..7fcfb2a --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/doc/tags @@ -0,0 +1 @@ +exheres-syntax.txt exheres-syntax.txt /*exheres-syntax.txt* diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/ftdetect/exheres.vim b/unmanaged-vim-plug/exheres-syntax-20160115/ftdetect/exheres.vim new file mode 100644 index 0000000..2c12855 --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/ftdetect/exheres.vim @@ -0,0 +1,14 @@ +" Vim filetype detection file +" Language: Exheres +" Author: Alexander Færøy +" 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 : diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/ftplugin/exheres-0.vim b/unmanaged-vim-plug/exheres-syntax-20160115/ftplugin/exheres-0.vim new file mode 100644 index 0000000..c595e2c --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/ftplugin/exheres-0.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: Exheres-0 +" Author: Alexander Færøy +" 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 : diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/ftplugin/exlib.vim b/unmanaged-vim-plug/exheres-syntax-20160115/ftplugin/exlib.vim new file mode 100644 index 0000000..7a47383 --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/ftplugin/exlib.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: Exlib +" Author: Alexander Færøy +" 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 : diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/indent/exheres-0.vim b/unmanaged-vim-plug/exheres-syntax-20160115/indent/exheres-0.vim new file mode 100644 index 0000000..c4a5f3d --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/indent/exheres-0.vim @@ -0,0 +1,18 @@ +" Vim indent file +" Language: Exheres-0 +" Author: Alexander Færøy +" 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 : diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/indent/exlib.vim b/unmanaged-vim-plug/exheres-syntax-20160115/indent/exlib.vim new file mode 100644 index 0000000..a4f0851 --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/indent/exlib.vim @@ -0,0 +1,18 @@ +" Vim indent file +" Language: Exlib +" Author: Alexander Færøy +" 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 : diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/plugin/new-common-metadata.vim b/unmanaged-vim-plug/exheres-syntax-20160115/plugin/new-common-metadata.vim new file mode 100644 index 0000000..8da69f4 --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/plugin/new-common-metadata.vim @@ -0,0 +1,89 @@ +" Vim plugin +" Language: Create new common-metadata.exlib +" Author: Saleem Abdulrasool +" Copyright: Copyright (c) 2008-2012 Saleem Abdulrasool +" License: You may redistribute this under the same terms as Vim itself + +if &compatible || v:version < 603 + finish +endif + +fun! GenerateCommonMetadataExlib() + let l:pastebackup = &paste + set nopaste + + if exists("*strftime") + let l:year = strftime("%Y") + else + let l: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 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 = "" +endif + +augroup NewCommonMetadataExlib + au! + " common-metadata.exlib + autocmd BufNewFile common-metadata.exlib + \ if g:common_metadata_create_on_empty | + \ call GenerateCommonMetadataExlib() | + \ endif + " ${PN}.exlib + autocmd BufNewFile *.exlib + \ if expand('%:p:t') == expand('%:p:h:t') . '.exlib' | + \ if g:common_metadata_create_on_empty | + \ call GenerateCommonMetadataExlib() | + \ endif | + \ endif +augroup END + +" vim: set et ts=4 sw=4 : diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/plugin/new-exheres-0.vim b/unmanaged-vim-plug/exheres-syntax-20160115/plugin/new-exheres-0.vim new file mode 100644 index 0000000..8ecf567 --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/plugin/new-exheres-0.vim @@ -0,0 +1,80 @@ +" Vim plugin +" Language: Create new exheres-0 package. +" Author: Alexander Færøy +" 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! GenerateExheresZeroPackage() + let l:pastebackup = &paste + set nopaste + + if exists("*strftime") + let l:year = strftime("%Y") + else + let l: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 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 = "" +endif + +augroup NewExheresZeroPackage + au! + autocmd BufNewFile *.exheres-0 + \ if g:package_create_on_empty | + \ call GenerateExheresZeroPackage() | + \ endif +augroup END + +" vim: set et ts=4 : diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/syntax/exheres-0.vim b/unmanaged-vim-plug/exheres-syntax-20160115/syntax/exheres-0.vim new file mode 100644 index 0000000..7e85a9a --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/syntax/exheres-0.vim @@ -0,0 +1,18 @@ +" Vim syntaxfile +" Language: Exheres-0 +" Author: Alexander Færøy +" 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 : diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/syntax/exheres-common.vim b/unmanaged-vim-plug/exheres-syntax-20160115/syntax/exheres-common.vim new file mode 100644 index 0000000..9e0a546 --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/syntax/exheres-common.vim @@ -0,0 +1,142 @@ +" Vim syntaxfile +" Language: Common code for exheres syntax +" Author: Alexander Færøy +" 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 : diff --git a/unmanaged-vim-plug/exheres-syntax-20160115/syntax/exlib.vim b/unmanaged-vim-plug/exheres-syntax-20160115/syntax/exlib.vim new file mode 100644 index 0000000..e4f0de6 --- /dev/null +++ b/unmanaged-vim-plug/exheres-syntax-20160115/syntax/exlib.vim @@ -0,0 +1,18 @@ +" Vim syntaxfile +" Language: Exheres-0 +" Author: Alexander Færøy +" 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 : diff --git a/vimrc b/vimrc index 41e29b0..51dfa49 100644 --- a/vimrc +++ b/vimrc @@ -7,7 +7,10 @@ set shortmess+=A filetype plugin on filetype indent on +set backspace=2 " make backspace work like most other programs +set cmdheight=1 +let g:ctrlp_map = '' " vim-plug settings (Plugin declaration) call plug#begin('~/.vim/plugged') @@ -31,19 +34,21 @@ Plug 'xolox/vim-misc' Plug 'nathanaelkane/vim-indent-guides' Plug 'Shougo/vimproc.vim', {'do' : 'make'} Plug 'sjbach/lusty' -Plug 'vim-airline/vim-airline' -Plug 'vim-airline/vim-airline-themes' +" Plug 'vim-airline/vim-airline' +" Plug 'vim-airline/vim-airline-themes' Plug 'kien/ctrlp.vim' Plug 'nixprime/cpsm', { 'do': 'PY3=ON ./install.sh' } Plug 'junegunn/fzf', { 'do': './install --bin' } Plug 'junegunn/fzf.vim' Plug 'sbdchd/neoformat' Plug 'AndrewRadev/bufferize.vim' -Plug 'vimwiki/vimwiki' +" Plug 'vimwiki/vimwiki' Plug 'vmchale/dhall-vim' Plug 'Shougo/echodoc.vim' Plug 'tpope/vim-scriptease' Plug 'Konfekt/FastFold' +" Plug 'lambdalisue/vim-fullscreen' +Plug 'editorconfig/editorconfig-vim' " scm @@ -95,17 +100,18 @@ Plug 'w0rp/ale', { " Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' } " completion based on ghc-mod, not LSP " Plug 'eagletmt/neco-ghc', { 'for': 'haskell' } -Plug 'lukerandall/haskellmode-vim', { 'for': 'haskell' } -Plug 'neovimhaskell/haskell-vim', { 'for': ['haskell', 'cabal'] } +" Plug 'lukerandall/haskellmode-vim', { 'for': 'haskell' } +Plug 'neovimhaskell/haskell-vim', { 'for': ['haskell', 'cabal']} " Plug 'ucsd-progsys/liquid-types.vim', { 'for': 'haskell' } Plug 'bitc/lushtags', { \ 'do': 'bash -c \"stack install\"', \ 'for': 'haskell', \ } " Plug 'timmytofu/vim-cabal-context', { 'for': 'haskell' } -Plug 'itchyny/vim-haskell-indent', { 'for': 'haskell' } -Plug 'dan-t/vim-hsimport', { 'for': 'haskell' } +" Plug 'itchyny/vim-haskell-indent', { 'for': 'haskell' } +" Plug 'dan-t/vim-hsimport', { 'for': 'haskell' } Plug 'Twinside/vim-hoogle', { 'for': 'haskell' } +" Plug 'axelf4/vim-haskell', { 'for': 'haskell' } 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/ScrollColor' Plug '~/.vim/unmanaged-vim-plug/txtfmt' +Plug '~/.vim/unmanaged-vim-plug/exheres-syntax-20160115' if !has('nvim') Plug '~/.vim/unmanaged-vim-plug/fontzoom' endif @@ -197,6 +204,13 @@ call CmdAlias('LS', 'LanguageClientStart') " 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 foldnestmax=10 "deepest fold is 10 levels set nofoldenable "dont fold by default @@ -240,15 +254,10 @@ endtry autocmd ColorScheme * highlight! link SignColumn LineNr " ==========colors=========== -"set t_Co=256 -"let g:solarized_termcolors=256 -if has('gui_running') - set background=dark - colorscheme solarized -else - set background=dark - colorscheme solarized -endif +" set t_Co=256 +let g:solarized_termcolors=256 +set background=dark +colorscheme solarized if has('nvim') if exists('g:GtkGuiLoaded')