Compare commits
39 Commits
master
...
0b2a3aa3fc
| Author | SHA1 | Date | |
|---|---|---|---|
| 0b2a3aa3fc | |||
| 60ea3da091 | |||
| 5f149871f7 | |||
| 7a8a1f425f | |||
| ea4275de9c | |||
| 728fc1cc94 | |||
| cb32e85d5c | |||
| fd0ec0ec30 | |||
| 2f8ea2f5bc | |||
| aa30843b94 | |||
| 9347f35352 | |||
| 6fb310f1f4 | |||
| 37f6c79332 | |||
| 7e7201f6d7 | |||
| 2f0190fad6 | |||
| c58eab1c0e | |||
| c5c5364205 | |||
| 23e2f09a8b | |||
| 901d336d82 | |||
| 6b6c3628bb | |||
| 635cc5748c | |||
| cf05781c02 | |||
| 23abdd12ac | |||
| b1e614cddc | |||
| 47a0889a7d | |||
| a356fa835c | |||
| 282cea9bab | |||
| 9ebf392548 | |||
| a63673b783 | |||
| 2ed664cb27 | |||
| 1e62563e18 | |||
| 548e45da01 | |||
| 239646b2ae | |||
| 184072280d | |||
| 42670e50af | |||
| 4457d21b1f | |||
| 3a053ca5c7 | |||
| 5960256ae0 | |||
| 75731d35c2 |
1
after/ftplugin/cabal.vim
Normal file
1
after/ftplugin/cabal.vim
Normal file
@@ -0,0 +1 @@
|
|||||||
|
setlocal expandtab
|
||||||
@@ -1,63 +1,61 @@
|
|||||||
setlocal ts=2 sw=2 expandtab omnifunc=necoghc#omnifunc
|
setlocal ts=2 sw=2 expandtab
|
||||||
|
|
||||||
"set background=light
|
"set background=light
|
||||||
"set guifont=Neep\ Medium\ Semi-Condensed\ 18
|
"set guifont=Neep\ Medium\ Semi-Condensed\ 18
|
||||||
|
|
||||||
let g:haskell_classic_highlighting = 1
|
|
||||||
|
|
||||||
let g:ghcmod_hlint_options = ['--ignore=Eta reduce $']
|
|
||||||
|
|
||||||
syntax on
|
syntax on
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
|
|
||||||
call CmdAlias('hasktags', '!/home/jule/.cabal/bin/hasktags -c .<CR>')
|
" tags
|
||||||
|
call CmdAlias('hasktags', '!hasktags -c .<CR>')
|
||||||
|
|
||||||
|
" from
|
||||||
|
" https://raw.githubusercontent.com/begriffs/haskell-vim-now/master/git-hscope
|
||||||
|
call CmdAlias('codex', 'call system("haskell-ctags")<CR><CR>call LoadHscope()<CR>')
|
||||||
|
|
||||||
|
|
||||||
let g:necoghc_enable_detailed_browse = 1
|
map <leader>tg :codex<CR>
|
||||||
|
set tags=tags;/,codex.tags;/
|
||||||
|
|
||||||
" ALE
|
nnoremap <leader>gd <C-]>
|
||||||
let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools'], 'c':['clang']}
|
nnoremap <silent> <leader>cgd :cs find g <C-R>=expand("<cword>")<CR><CR>
|
||||||
" let g:ale_fixers = {
|
nnoremap <silent> <C-\> :cs find c <C-R>=expand("<cword>")<CR><CR>
|
||||||
" \ 'go': ['gofmt', 'goimports'],
|
|
||||||
" \}
|
|
||||||
let g:ale_haskell_hdevtools_options = "-g '-Wall' -g '-Wno-orphans'"
|
|
||||||
|
|
||||||
" neco-ghc
|
set cscopeprg=do_at_stack_root\ hscope
|
||||||
let g:haskellmode_completion_ghc = 0
|
set csre
|
||||||
let g:necoghc_enable_detailed_browse = 1
|
set csto=1 " search codex tags first
|
||||||
autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
|
set nocst
|
||||||
let g:ycm_semantic_triggers = {'haskell' : ['.']}
|
" set cscopequickfix=s-,c-,d-,i-,t-,e-,a-
|
||||||
|
|
||||||
|
function! LoadHscope()
|
||||||
function! HaskellDocCurrentWord()
|
set nocscopeverbose " suppress 'duplicate connection' error
|
||||||
let word = expand("<cword>")
|
let hsf = findfile("hscope.out", ".;")
|
||||||
exe "IDoc " . word
|
if filereadable(hsf)
|
||||||
|
exe "cs add " . hsf
|
||||||
|
elseif $HSCOPE_DB != ""
|
||||||
|
cs add $HSCOPE_DB
|
||||||
|
endif
|
||||||
|
set cscopeverbose
|
||||||
endfunction
|
endfunction
|
||||||
|
au BufEnter /*.hs call LoadHscope()
|
||||||
|
|
||||||
|
|
||||||
" clear search
|
|
||||||
nmap <F2> :noh<CR>:GhcModTypeClear<CR>
|
|
||||||
imap <F2> <C-O>:noh<CR>:GhcModTypeClear<CR>
|
|
||||||
|
|
||||||
" unmap <F3>
|
|
||||||
" unmap <F4>
|
|
||||||
|
|
||||||
nmap <F6> :GhcModType<CR>
|
|
||||||
nmap <F8> :call HaskellDocCurrentWord()<CR><CR>
|
|
||||||
|
|
||||||
|
|
||||||
nmap <silent> <F3> :silent update <bar> HsimportModule<CR>
|
"hoogle
|
||||||
nmap <silent> <F4> :silent update <bar> HsimportSymbol<CR>
|
nnoremap <leader>ho :Hoogle<CR>
|
||||||
|
nnoremap <leader>hc :HoogleClose<CR>
|
||||||
|
|
||||||
|
|
||||||
" haskell-vim
|
" haskell-vim
|
||||||
|
let g:haskell_classic_highlighting = 1
|
||||||
|
let g:haskell_indent_disable = 1
|
||||||
" 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
|
||||||
" let g:haskell_enable_pattern_synonyms = 1
|
" let g:haskell_enable_pattern_synonyms = 1
|
||||||
" let g:haskell_enable_typeroles = 1
|
" let g:haskell_enable_typeroles = 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
|
||||||
@@ -66,6 +64,19 @@ nmap <silent> <F4> :silent update <bar> HsimportSymbol<CR>
|
|||||||
" let g:haskell_indent_in = 1
|
" let g:haskell_indent_in = 1
|
||||||
|
|
||||||
|
|
||||||
|
" haskellmode-vim
|
||||||
|
function! HaskellDocCurrentWord()
|
||||||
|
let word = expand("<cword>")
|
||||||
|
exe "IDoc " . word
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" done by LSP now
|
||||||
|
nmap <F7> :call HaskellDocCurrentWord()<CR><CR>
|
||||||
|
|
||||||
|
nmap <silent> <F3> :silent update <bar> HsimportModule<CR>
|
||||||
|
nmap <silent> <F4> :silent update <bar> HsimportSymbol<CR>
|
||||||
|
|
||||||
|
|
||||||
" liquid-types
|
" liquid-types
|
||||||
let g:vim_annotations_offset = '/.liquid/'
|
let g:vim_annotations_offset = '/.liquid/'
|
||||||
|
|
||||||
@@ -83,16 +94,95 @@ let g:vim_annotations_offset = '/.liquid/'
|
|||||||
" endfunction
|
" endfunction
|
||||||
|
|
||||||
|
|
||||||
" let g:deoplete#enable_at_startup = 1
|
|
||||||
|
|
||||||
" set hidden
|
" LSP
|
||||||
|
let g:LanguageClient_autoStart = 0
|
||||||
|
let g:LanguageClient_serverCommands = {
|
||||||
|
\ 'haskell': ['hie-wrapper', '--lsp', '-d', '-l', $HOME.'/lang-server.log'],
|
||||||
|
\ }
|
||||||
|
" we use ALE instead
|
||||||
|
let g:LanguageClient_diagnosticsEnable = 0
|
||||||
|
|
||||||
" let g:LanguageClient_serverCommands = {
|
nnoremap <leader>lc :call LanguageClient_contextMenu()<CR>
|
||||||
" \ 'haskell': ['hie', '--lsp', '-d', '-l', '/home/hasufell/lang-server.log'],
|
|
||||||
" \ }
|
|
||||||
|
|
||||||
" nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
|
|
||||||
" nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
" nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
||||||
" nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
|
nnoremap <silent> <C-F6> :call LanguageClient#textDocument_hover()<CR>
|
||||||
|
vnoremap <silent> <C-F6> :call LanguageClient#textDocument_hover()<CR>
|
||||||
|
nnoremap <silent> <C-F8> :call LanguageClient#textDocument_rename()<CR>
|
||||||
|
|
||||||
" autocmd VimEnter * LanguageClientStart
|
" deoplete
|
||||||
|
call deoplete#custom#option('sources',{
|
||||||
|
\ '_': ['buffer'],
|
||||||
|
\ 'haskell': ['neosnippet', 'buffer', 'file', 'neco-ghc']
|
||||||
|
\ })
|
||||||
|
" \ 'haskell': ['neosnippet', 'buffer', 'file', 'neco-ghc']
|
||||||
|
" inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
||||||
|
call deoplete#enable()
|
||||||
|
call deoplete#enable_logging('DEBUG', $HOME . '/deoplete.log')
|
||||||
|
|
||||||
|
let g:ghcmod_hlint_options = ['--ignore=Eta reduce $']
|
||||||
|
|
||||||
|
" ALE
|
||||||
|
let g:ale_enabled = 0
|
||||||
|
let g:ale_linters = {'haskell':[], 'c':['clang']}
|
||||||
|
" let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools', 'argon'], 'c':['clang']}
|
||||||
|
" let g:ale_fixers = {
|
||||||
|
" \ 'haskell': ['brittany'],
|
||||||
|
" \}
|
||||||
|
let g:ale_haskell_hdevtools_options = "-g '-Wall' -g '-Wno-orphans'"
|
||||||
|
let g:ale_haskell_argon_error_level = 14
|
||||||
|
let g:ale_haskell_argon_warn_level = 10
|
||||||
|
let g:ale_haskell_argon_info_level = 6
|
||||||
|
|
||||||
|
" completion
|
||||||
|
"
|
||||||
|
" neco-ghc
|
||||||
|
" let g:necoghc_enable_detailed_browse = 1
|
||||||
|
" let g:haskellmode_completion_ghc = 0
|
||||||
|
" autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
|
||||||
|
" let g:ycm_semantic_triggers = {'haskell' : ['.']}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
" clear search
|
||||||
|
nmap <F2> :noh<CR>:GhcModTypeClear<CR>
|
||||||
|
imap <F2> <C-O>:noh<CR>:GhcModTypeClear<CR>
|
||||||
|
|
||||||
|
" unmap <F3>
|
||||||
|
" unmap <F4>
|
||||||
|
|
||||||
|
nmap <F6> :GhcModType<CR>
|
||||||
|
|
||||||
|
" for intero
|
||||||
|
" if has("nvim")
|
||||||
|
" let g:ale_enabled = 0
|
||||||
|
|
||||||
|
" " let g:intero_backend = {
|
||||||
|
" " \ 'command': 'cabal new-repl',
|
||||||
|
" " \ 'options': '',
|
||||||
|
" " \ 'cwd': expand('%:p:h'),
|
||||||
|
" " \}
|
||||||
|
|
||||||
|
" " Intero starts automatically. Set this if you'd like to prevent that.
|
||||||
|
" let g:intero_start_immediately = 1
|
||||||
|
|
||||||
|
" " Enable type information on hover (when holding cursor at point for ~1 second).
|
||||||
|
" let g:intero_type_on_hover = 1
|
||||||
|
|
||||||
|
" " Change the intero window size; default is 10.
|
||||||
|
" let g:intero_window_size = 15
|
||||||
|
|
||||||
|
" " Sets the intero window to split vertically; default is horizontal
|
||||||
|
" " let g:intero_vertical_split = 1
|
||||||
|
|
||||||
|
" " let g:intero_ghci_options = '-dynamic'
|
||||||
|
|
||||||
|
" " OPTIONAL: Make the update time shorter, so the type info will trigger faster.
|
||||||
|
" set updatetime=1000
|
||||||
|
|
||||||
|
" map <silent> <leader>t <Plug>InteroGenericType
|
||||||
|
" nnoremap <silent> <leader>jd :InteroGoToDef<CR>
|
||||||
|
" map <silent> <leader>T <Plug>InteroType
|
||||||
|
" nnoremap <silent> <leader>it :InteroTypeInsert<CR>
|
||||||
|
" nnoremap <leader>ist :InteroSetTargets<SPACE>
|
||||||
|
" endif
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
let g:rustfmt_autosave = 0
|
|
||||||
|
|
||||||
let g:tagbar_ctags_bin = '/usr/bin/universal-ctags'
|
let g:tagbar_ctags_bin = '/usr/bin/universal-ctags'
|
||||||
|
|
||||||
let g:rust_doc#define_map_K = 0
|
let g:rust_doc#define_map_K = 0
|
||||||
@@ -15,13 +13,13 @@ function! s:search_under_cursor(query) range
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" keys
|
" keys
|
||||||
nnoremap <buffer><silent><F6> :<C-u>call <SID>search_under_cursor(expand('<cword>'))<CR>
|
nnoremap <buffer><silent><F7> :<C-u>call <SID>search_under_cursor(expand('<cword>'))<CR>
|
||||||
vnoremap <buffer><silent><F6> "gy:call <SID>search_under_cursor(getreg('g'))<CR>
|
vnoremap <buffer><silent><F7> "gy:call <SID>search_under_cursor(getreg('g'))<CR>
|
||||||
|
|
||||||
nnoremap <F3> :call LanguageClient_contextMenu()<CR>
|
nnoremap <F3> :call LanguageClient_contextMenu()<CR>
|
||||||
nnoremap <silent> <F4> :call LanguageClient#textDocument_definition()<CR>
|
nnoremap <silent> <F4> :call LanguageClient#textDocument_definition()<CR>
|
||||||
nnoremap <silent> <F7> :call LanguageClient#textDocument_hover()<CR>
|
nnoremap <silent> <F6> :call LanguageClient#textDocument_hover()<CR>
|
||||||
nnoremap <silent> <F6> :call LanguageClient#textDocument_rename()<CR>
|
nnoremap <silent> <F8> :call LanguageClient#textDocument_rename()<CR>
|
||||||
|
|
||||||
|
|
||||||
let g:LanguageClient_autoStart = 1
|
let g:LanguageClient_autoStart = 1
|
||||||
@@ -29,7 +27,18 @@ let g:LanguageClient_autoStart = 1
|
|||||||
let g:LanguageClient_serverCommands = {
|
let g:LanguageClient_serverCommands = {
|
||||||
\ 'rust': ['rustup', 'run', 'nightly', 'rls'] }
|
\ 'rust': ['rustup', 'run', 'nightly', 'rls'] }
|
||||||
|
|
||||||
|
let g:LanguageClient_diagnosticsEnable = 0
|
||||||
|
|
||||||
let g:ale_linters = {'rust': ['rls']}
|
let g:ale_linters = {'rust': ['rls']}
|
||||||
let g:ale_fixers = { 'rust': ['rustfmt'] }
|
let g:ale_fixers = { 'rust': ['rustfmt'] }
|
||||||
|
|
||||||
|
let g:ale_fix_on_save = 0
|
||||||
let g:autofmt_autosave = 0
|
let g:autofmt_autosave = 0
|
||||||
|
|
||||||
|
" deoplete
|
||||||
|
call deoplete#custom#option('sources',{
|
||||||
|
\ '_': ['buffer'],
|
||||||
|
\ 'rust': ['ultisnips', 'buffer', 'file', 'LanguageClient']
|
||||||
|
\ })
|
||||||
|
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
||||||
|
call deoplete#enable()
|
||||||
|
|||||||
69
ale_linters/haskell/argon.vim
Normal file
69
ale_linters/haskell/argon.vim
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
" Author: Julian Ospald <hasufell@hasufell.de>
|
||||||
|
" Description: argon for Haskell files
|
||||||
|
|
||||||
|
call ale#Set('haskell_argon_executable', 'argon')
|
||||||
|
call ale#Set('haskell_argon_options', '')
|
||||||
|
call ale#Set('haskell_argon_error_level', 12)
|
||||||
|
call ale#Set('haskell_argon_warn_level', 8)
|
||||||
|
call ale#Set('haskell_argon_info_level', 4)
|
||||||
|
|
||||||
|
|
||||||
|
function! ale_linters#haskell#argon#GetExecutable(buffer) abort
|
||||||
|
return ale#Var(a:buffer, 'haskell_argon_executable')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! ale_linters#haskell#argon#GetCommand(buffer) abort
|
||||||
|
return ale#Escape(ale_linters#haskell#argon#GetExecutable(a:buffer))
|
||||||
|
\ . ' '
|
||||||
|
\ . ale#Var(a:buffer, 'haskell_argon_options')
|
||||||
|
\ . ' -m ' . ale#Var(a:buffer, 'haskell_argon_info_level')
|
||||||
|
\ . ' -j'
|
||||||
|
\ . ' %t'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! ale_linters#haskell#argon#Handle(buffer, lines) abort
|
||||||
|
let l:output = []
|
||||||
|
|
||||||
|
for l:error in ale#util#FuzzyJSONDecode(a:lines, [])
|
||||||
|
if !has_key(l:error, 'blocks')
|
||||||
|
" this cannot be formatted properly into an ALE error
|
||||||
|
execute 'echom ''[argon] '' l:error.message'
|
||||||
|
return l:output
|
||||||
|
endif
|
||||||
|
for l:block in l:error.blocks
|
||||||
|
let l:complexity = l:block.complexity
|
||||||
|
|
||||||
|
if l:complexity >= ale#Var(a:buffer, 'haskell_argon_error_level')
|
||||||
|
let l:type = 'E'
|
||||||
|
let l:max_c = ale#Var(a:buffer, 'haskell_argon_error_level')
|
||||||
|
elseif l:complexity >= ale#Var(a:buffer, 'haskell_argon_warn_level')
|
||||||
|
let l:type = 'W'
|
||||||
|
let l:max_c = ale#Var(a:buffer, 'haskell_argon_warn_level')
|
||||||
|
else
|
||||||
|
let l:type = 'I'
|
||||||
|
let l:max_c = ale#Var(a:buffer, 'haskell_argon_info_level')
|
||||||
|
endif
|
||||||
|
|
||||||
|
call add(l:output, {
|
||||||
|
\ 'filename': l:error.path,
|
||||||
|
\ 'lnum': l:block.lineno,
|
||||||
|
\ 'col': l:block.col,
|
||||||
|
\ 'text': l:block.name . ': cyclomatic complexity of ' . l:complexity,
|
||||||
|
\ 'type': l:type,
|
||||||
|
\})
|
||||||
|
endfor
|
||||||
|
endfor
|
||||||
|
|
||||||
|
return l:output
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
call ale#linter#Define('haskell', {
|
||||||
|
\ 'name': 'argon',
|
||||||
|
\ 'executable_callback': 'ale_linters#haskell#argon#GetExecutable',
|
||||||
|
\ 'command_callback': 'ale_linters#haskell#argon#GetCommand',
|
||||||
|
\ 'callback': 'ale_linters#haskell#argon#Handle',
|
||||||
|
\})
|
||||||
|
|
||||||
4
custom-snippets/haskell.snippets
Normal file
4
custom-snippets/haskell.snippets
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
snippet docsec
|
||||||
|
------------------------
|
||||||
|
--[ ${0:DOCUMENT SECTION} ]--
|
||||||
|
------------------------
|
||||||
2
custom-snippets/markdown.snippets
Normal file
2
custom-snippets/markdown.snippets
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
snippet tc
|
||||||
|
\textcolor{${1:red}}{${0}}
|
||||||
@@ -37,6 +37,9 @@ noremap <leader>bd <Esc>:bd<CR>
|
|||||||
noremap <leader>wc <Esc>:bd<CR>
|
noremap <leader>wc <Esc>:bd<CR>
|
||||||
noremap <leader>bo <Esc>:Bufonly<CR>
|
noremap <leader>bo <Esc>:Bufonly<CR>
|
||||||
|
|
||||||
|
" close preview
|
||||||
|
nmap <C-p> :pc<CR>
|
||||||
|
|
||||||
" Remap window commands
|
" Remap window commands
|
||||||
" map <leader>ws <Esc>:wincmd s<CR>
|
" map <leader>ws <Esc>:wincmd s<CR>
|
||||||
" map <leader>wv <Esc>:wincmd v<CR>
|
" map <leader>wv <Esc>:wincmd v<CR>
|
||||||
|
|||||||
@@ -706,6 +706,11 @@ let s:FUF_BUF_NAME = '[fuf]'
|
|||||||
|
|
||||||
"
|
"
|
||||||
function s:activateFufBuffer()
|
function s:activateFufBuffer()
|
||||||
|
" Save the last window number so we can switch back to it later (otherwise,
|
||||||
|
" at least with more recent versions of Vim, we end up with the top left
|
||||||
|
" window focused)
|
||||||
|
let s:fuf_buffer_last_winnr = winnr()
|
||||||
|
|
||||||
" lcd . : To avoid the strange behavior that unnamed buffer changes its cwd
|
" lcd . : To avoid the strange behavior that unnamed buffer changes its cwd
|
||||||
" if 'autochdir' was set on.
|
" if 'autochdir' was set on.
|
||||||
lcd .
|
lcd .
|
||||||
@@ -733,6 +738,7 @@ function s:deactivateFufBuffer()
|
|||||||
AutoComplPopUnlock
|
AutoComplPopUnlock
|
||||||
endif
|
endif
|
||||||
call l9#tempbuffer#close(s:FUF_BUF_NAME)
|
call l9#tempbuffer#close(s:FUF_BUF_NAME)
|
||||||
|
exec s:fuf_buffer_last_winnr . "wincmd w"
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
From fd41e8d68b6774324b58c02692b896a6a36a0397 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Wolever <david@wolever.net>
|
||||||
|
Date: Thu, 1 Jun 2017 10:11:43 -0400
|
||||||
|
Subject: [PATCH] Fix focus top left window bug
|
||||||
|
|
||||||
|
With newer versions of Vim, the top left window will be focused after
|
||||||
|
opening the fuf menu. This patch restores the window focus after the
|
||||||
|
menu is closed.
|
||||||
|
---
|
||||||
|
autoload/fuf.vim | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/autoload/fuf.vim b/autoload/fuf.vim
|
||||||
|
index fe9e6eb..78be490 100644
|
||||||
|
--- a/autoload/fuf.vim
|
||||||
|
+++ b/autoload/fuf.vim
|
||||||
|
@@ -706,6 +706,11 @@ let s:FUF_BUF_NAME = '[fuf]'
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:activateFufBuffer()
|
||||||
|
+ " Save the last window number so we can switch back to it later (otherwise,
|
||||||
|
+ " at least with more recent versions of Vim, we end up with the top left
|
||||||
|
+ " window focused)
|
||||||
|
+ let s:fuf_buffer_last_winnr = winnr()
|
||||||
|
+
|
||||||
|
" lcd . : To avoid the strange behavior that unnamed buffer changes its cwd
|
||||||
|
" if 'autochdir' was set on.
|
||||||
|
lcd .
|
||||||
|
@@ -733,6 +738,7 @@ function s:deactivateFufBuffer()
|
||||||
|
AutoComplPopUnlock
|
||||||
|
endif
|
||||||
|
call l9#tempbuffer#close(s:FUF_BUF_NAME)
|
||||||
|
+ exec s:fuf_buffer_last_winnr . "wincmd w"
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
368
vimrc
368
vimrc
@@ -5,10 +5,6 @@
|
|||||||
filetype plugin on
|
filetype plugin on
|
||||||
filetype indent on
|
filetype indent on
|
||||||
|
|
||||||
" Section pathogen
|
|
||||||
" let g:pathogen_disabled = []
|
|
||||||
" call add(g:pathogen_disabled, 'syntastic')
|
|
||||||
" call pathogen#infect()
|
|
||||||
|
|
||||||
|
|
||||||
" vim-plug settings (Plugin declaration)
|
" vim-plug settings (Plugin declaration)
|
||||||
@@ -25,16 +21,10 @@ Plug 'vim-scripts/genindent.vim'
|
|||||||
Plug 'sjl/gundo.vim'
|
Plug 'sjl/gundo.vim'
|
||||||
Plug 'idris-hackers/idris-vim'
|
Plug 'idris-hackers/idris-vim'
|
||||||
Plug 'wimstefan/Lightning'
|
Plug 'wimstefan/Lightning'
|
||||||
Plug 'vim-scripts/LustyJuggler'
|
|
||||||
Plug 'yegappan/mru'
|
Plug 'yegappan/mru'
|
||||||
Plug 'scrooloose/nerdcommenter'
|
Plug 'scrooloose/nerdcommenter'
|
||||||
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||||
Plug 'NLKNguyen/papercolor-theme'
|
Plug 'NLKNguyen/papercolor-theme'
|
||||||
Plug 'powerline/powerline', {
|
|
||||||
\ 'branch': 'develop',
|
|
||||||
\ 'do': 'python setup.py install --user',
|
|
||||||
\ 'rtp': 'powerline/bindings/vim',
|
|
||||||
\ }
|
|
||||||
Plug 'vim-scripts/promela.vim'
|
Plug 'vim-scripts/promela.vim'
|
||||||
Plug 'AndrewRadev/simple_bookmarks.vim'
|
Plug 'AndrewRadev/simple_bookmarks.vim'
|
||||||
Plug 'Keithbsmiley/swift.vim'
|
Plug 'Keithbsmiley/swift.vim'
|
||||||
@@ -51,11 +41,39 @@ Plug 'nathanaelkane/vim-indent-guides'
|
|||||||
Plug 'xolox/vim-misc'
|
Plug 'xolox/vim-misc'
|
||||||
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
|
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
|
||||||
Plug 'tpope/vim-rhubarb'
|
Plug 'tpope/vim-rhubarb'
|
||||||
|
Plug 'sjbach/lusty'
|
||||||
|
if has("nvim")
|
||||||
|
Plug 'iCyMind/NeoSolarized'
|
||||||
|
endif
|
||||||
|
Plug 'vim-airline/vim-airline'
|
||||||
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
|
Plug 'kien/ctrlp.vim'
|
||||||
|
Plug 'hasufell/cpsm', { 'do': 'PY3=ON ./install.sh' }
|
||||||
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||||
|
Plug 'junegunn/fzf.vim'
|
||||||
|
|
||||||
" local_vimrc
|
" local_vimrc
|
||||||
Plug 'LucHermitte/lh-vim-lib'
|
Plug 'LucHermitte/lh-vim-lib'
|
||||||
Plug 'LucHermitte/local_vimrc'
|
Plug 'LucHermitte/local_vimrc'
|
||||||
|
|
||||||
|
" completion
|
||||||
|
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --go-completer --rust-completer --system-boost --system-libclang',
|
||||||
|
\ 'for': ['c', 'python', 'sh', 'go', 'clojure'],
|
||||||
|
\ }
|
||||||
|
" deoplete for haskell
|
||||||
|
if has('nvim')
|
||||||
|
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins',
|
||||||
|
\ }
|
||||||
|
else
|
||||||
|
Plug 'Shougo/deoplete.nvim'
|
||||||
|
Plug 'roxma/nvim-yarp'
|
||||||
|
Plug 'roxma/vim-hug-neovim-rpc'
|
||||||
|
endif
|
||||||
|
|
||||||
|
" snippets
|
||||||
|
Plug 'Shougo/neosnippet.vim'
|
||||||
|
Plug 'honza/vim-snippets'
|
||||||
|
|
||||||
" LSP
|
" LSP
|
||||||
" setting this per-language breaks "let g:LanguageClient_autoStart = 1",
|
" setting this per-language breaks "let g:LanguageClient_autoStart = 1",
|
||||||
Plug 'autozimu/LanguageClient-neovim', {
|
Plug 'autozimu/LanguageClient-neovim', {
|
||||||
@@ -63,41 +81,38 @@ Plug 'autozimu/LanguageClient-neovim', {
|
|||||||
\ 'do': 'bash install.sh',
|
\ 'do': 'bash install.sh',
|
||||||
\ }
|
\ }
|
||||||
" (Optional) Multi-entry selection UI.
|
" (Optional) Multi-entry selection UI.
|
||||||
" Plug 'junegunn/fzf', { 'for': 'haskell' }
|
Plug 'junegunn/fzf', { 'for': 'haskell' }
|
||||||
" autocomplet
|
|
||||||
" Plug 'Shougo/deoplete.nvim', { 'for': 'haskell' }
|
|
||||||
" Plug 'roxma/nvim-yarp', { 'for': 'haskell' }
|
|
||||||
" Plug 'roxma/vim-hug-neovim-rpc', { 'for': 'haskell' }
|
|
||||||
|
|
||||||
" linting/compilation
|
" linting/compilation
|
||||||
Plug 'w0rp/ale'
|
Plug 'w0rp/ale', {
|
||||||
|
\ 'do': 'bash -c \"cp -R ~/.vim/ale_linters .\"',
|
||||||
" completion
|
\ }
|
||||||
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --go-completer --rust-completer --system-boost --system-libclang',
|
|
||||||
\ 'for': ['haskell', 'c', 'python', 'sh', 'go', 'clojure', 'rust'],
|
|
||||||
\ }
|
|
||||||
|
|
||||||
" haskell
|
" haskell
|
||||||
Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' }
|
" if has("nvim")
|
||||||
Plug 'eagletmt/neco-ghc', { 'for': 'haskell' }
|
" Plug 'parsonsmatt/intero-neovim'
|
||||||
|
" endif
|
||||||
|
" 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 'lukerandall/haskellmode-vim', { 'for': 'haskell' }
|
||||||
Plug 'raichoo/haskell-vim', { 'for': 'haskell' }
|
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', {
|
||||||
\ 'do': 'bash -c \"cabal clean && cabal sandbox delete && cabal sandbox init && cabal install && cp .cabal-sandbox/bin/lushtags ~/.cabal/bin/lushtags\"',
|
\ 'do': 'bash -c \"stack install\"',
|
||||||
\ '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' }
|
||||||
|
|
||||||
" clojure
|
" clojure
|
||||||
" Plug '~/.vim/unmanaged-vim-plug/paredit', { 'for': 'clojure' }
|
|
||||||
" Plug '~/.vim/unmanaged-vim-plug/tslime', { 'for': 'clojure' }
|
" Plug '~/.vim/unmanaged-vim-plug/tslime', { 'for': 'clojure' }
|
||||||
Plug 'guns/vim-slamhound', {'for': 'clojure'}
|
Plug 'guns/vim-slamhound', {'for': 'clojure'}
|
||||||
Plug 'guns/vim-sexp', {'for': 'clojure'}
|
" Plug 'guns/vim-sexp', {'for': 'clojure'}
|
||||||
Plug 'tpope/vim-sexp-mappings-for-regular-people', {'for': 'clojure'}
|
" Plug 'tpope/vim-sexp-mappings-for-regular-people', {'for': 'clojure'}
|
||||||
Plug 'kovisoft/paredit', {'for': 'clojure'}
|
" Plug 'kovisoft/paredit', {'for': 'clojure'}
|
||||||
Plug 'tpope/vim-salve', { 'for': 'clojure' }
|
Plug 'tpope/vim-salve', { 'for': 'clojure' }
|
||||||
Plug 'tpope/vim-projectionist', { 'for': 'clojure' }
|
Plug 'tpope/vim-projectionist', { 'for': 'clojure' }
|
||||||
Plug 'tpope/vim-dispatch', { 'for': 'clojure' }
|
Plug 'tpope/vim-dispatch', { 'for': 'clojure' }
|
||||||
@@ -127,29 +142,147 @@ Plug 'derekwyatt/vim-scala', { 'for': 'scala' }
|
|||||||
" unmanaged
|
" unmanaged
|
||||||
Plug '~/.vim/unmanaged-vim-plug/bufonly'
|
Plug '~/.vim/unmanaged-vim-plug/bufonly'
|
||||||
Plug '~/.vim/unmanaged-vim-plug/colorschemedegrade'
|
Plug '~/.vim/unmanaged-vim-plug/colorschemedegrade'
|
||||||
Plug '~/.vim/unmanaged-vim-plug/fontzoom'
|
|
||||||
Plug '~/.vim/unmanaged-vim-plug/fuzzyfinder'
|
Plug '~/.vim/unmanaged-vim-plug/fuzzyfinder'
|
||||||
Plug '~/.vim/unmanaged-vim-plug/L9'
|
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'
|
||||||
|
if !has("nvim")
|
||||||
|
Plug '~/.vim/unmanaged-vim-plug/fontzoom'
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
" Initialize plugin system
|
" Initialize plugin system
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
|
||||||
" ===== further plugin initialization =====
|
" ===== further plugin initialization and default config =====
|
||||||
so ~/.vim/plugged/cmdalias.vim/plugin/cmdalias.vim
|
so ~/.vim/plugged/cmdalias.vim/plugin/cmdalias.vim
|
||||||
|
|
||||||
"powerline
|
|
||||||
python from powerline.vim import setup as powerline_setup
|
|
||||||
python powerline_setup()
|
|
||||||
python del powerline_setup
|
|
||||||
set laststatus=2
|
|
||||||
|
|
||||||
" lj
|
if !has("nvim")
|
||||||
let g:LustyJugglerSuppressRubyWarning = 1
|
" lj
|
||||||
|
let g:LustyJugglerSuppressRubyWarning = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
" lustyexplorer
|
||||||
|
set hidden
|
||||||
|
|
||||||
|
|
||||||
|
" neosnippet
|
||||||
|
" Plugin key-mappings.
|
||||||
|
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
|
||||||
|
imap <C-k> <Plug>(neosnippet_expand_or_jump)
|
||||||
|
smap <C-k> <Plug>(neosnippet_expand_or_jump)
|
||||||
|
xmap <C-k> <Plug>(neosnippet_expand_target)
|
||||||
|
|
||||||
|
" SuperTab like snippets behavior.
|
||||||
|
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
|
||||||
|
imap <expr><tab> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<c-n>" : "\<tab>"
|
||||||
|
smap <expr><tab> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<tab>"
|
||||||
|
|
||||||
|
" For conceal markers.
|
||||||
|
if has('conceal')
|
||||||
|
set conceallevel=2 concealcursor=niv
|
||||||
|
endif
|
||||||
|
" Enable snipMate compatibility feature.
|
||||||
|
let g:neosnippet#enable_snipmate_compatibility = 1
|
||||||
|
let g:neosnippet#snippets_directory='~/.vim/custom-snippets'
|
||||||
|
|
||||||
|
|
||||||
|
" vim airline
|
||||||
|
" let g:airline#extensions#tabline#enabled = 1
|
||||||
|
|
||||||
|
|
||||||
|
" LSP
|
||||||
|
let g:LanguageClient_autoStart = 0
|
||||||
|
|
||||||
|
" deoplete
|
||||||
|
let g:deoplete#enable_at_startup = 1
|
||||||
|
|
||||||
|
" ==== delimitMate ====
|
||||||
|
let g:delimitMate_matchpairs = "(:),[:],{:}"
|
||||||
|
let g:delimitMate_expand_cr = 1
|
||||||
|
let g:delimitMate_expand_space = 1
|
||||||
|
let g:delimitMate_autoclose = 1
|
||||||
|
|
||||||
|
|
||||||
|
" Solarized stuff
|
||||||
|
" let g:solarized_termtrans=0
|
||||||
|
" let g:solarized_degrade=0
|
||||||
|
" let g:solarized_bold=1
|
||||||
|
" let g:solarized_underline=1
|
||||||
|
" let g:solarized_italic=1
|
||||||
|
" let g:solarized_termcolors=16
|
||||||
|
" let g:solarized_contrast="normal"
|
||||||
|
let g:solarized_visibility="high"
|
||||||
|
" let g:solarized_diffmode="normal"
|
||||||
|
" let g:solarized_hitrail=0
|
||||||
|
let g:solarized_menu=1
|
||||||
|
|
||||||
|
|
||||||
|
" youcompleteme
|
||||||
|
let g:ycm_filetype_blacklist = {
|
||||||
|
\ 'notes' : 1,
|
||||||
|
\ 'markdown' : 1,
|
||||||
|
\ 'text' : 1,
|
||||||
|
\ 'java' : 1,
|
||||||
|
\}
|
||||||
|
let g:ycm_confirm_extra_conf = 0
|
||||||
|
let g:ycm_global_ycm_extra_conf='~/.vim/.ycm_extra_conf.py'
|
||||||
|
let g:ycm_collect_identifiers_from_tags_files = 1
|
||||||
|
let g:ycm_seed_identifiers_with_syntax = 0
|
||||||
|
" let g:ycm_always_populate_location_list = 1
|
||||||
|
let g:ycm_autoclose_preview_window_after_completion = 1
|
||||||
|
let g:ycm_key_invoke_completion = '<C-Space>'
|
||||||
|
let g:ycm_key_list_select_completion = ['<TAB>']
|
||||||
|
let g:ycm_key_list_previous_completion = ['<S-TAB>']
|
||||||
|
" nnoremap <F4> :YcmCompleter GoToDefinition<CR>
|
||||||
|
let g:ycm_server_log_level = 'error'
|
||||||
|
let g:ycm_semantic_triggers = {'haskell' : ['. ', '$ ']}
|
||||||
|
let g:ycm_goto_buffer_command = 'horizontal-split'
|
||||||
|
|
||||||
|
|
||||||
|
" commenting
|
||||||
|
let NERDSpaceDelims=1
|
||||||
|
let NERDCreateDefaultMappings=0
|
||||||
|
|
||||||
|
" haskellmode, needs to load early
|
||||||
|
let g:haddock_browser='/usr/bin/firefox'
|
||||||
|
let g:haddock_browser_callformat='%s file://%s >/dev/null 2>&1 &'
|
||||||
|
|
||||||
|
" ctrlp
|
||||||
|
let g:ctrlp_user_command = 'fd --type f --color=never "" %s'
|
||||||
|
let g:ctrlp_use_caching = 1
|
||||||
|
let g:ctrlp_match_func = { 'match': 'cpsm#CtrlPMatch' }
|
||||||
|
|
||||||
|
" fzf
|
||||||
|
" --column: Show column number
|
||||||
|
" --line-number: Show line number
|
||||||
|
" --no-heading: Do not show file headings in results
|
||||||
|
" --fixed-strings: Search term as a literal string
|
||||||
|
" --ignore-case: Case insensitive search
|
||||||
|
" --no-ignore: Do not respect .gitignore, etc...
|
||||||
|
" --hidden: Search hidden files and folders
|
||||||
|
" --follow: Follow symlinks
|
||||||
|
" --glob: Additional conditions for search (in this case ignore everything in the .git/ folder)
|
||||||
|
" --color: Search color options
|
||||||
|
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>), 1, <bang>0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
" ==== conque ====
|
||||||
|
" command aliases
|
||||||
|
call CmdAlias('t','tabnew')
|
||||||
|
" call CmdAlias('cmd','ConqueTermSplit')
|
||||||
|
" call CmdAlias('bash','ConqueTermSplit bash<CR>')
|
||||||
|
call CmdAlias('openall','tab sball')
|
||||||
|
call CmdAlias('stripw','call StripTrailingWhitespaces()<CR>')
|
||||||
|
call CmdAlias('hotkeys', 'tabnew ~/.vim/hotkeys')
|
||||||
|
call CmdAlias('TC', 'call ToggleComment()<CR>')
|
||||||
|
call CmdAlias('TF', 'call ToggleFoldText()<CR>')
|
||||||
|
call CmdAlias('ctags', '!/usr/bin/ctags -R --langmap=c:.c.h --c++-kinds=+p --c-kinds=+p+x --fields=+i+a+S+t+l+m+n --extra=+q .<CR>')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" global settings
|
" global settings
|
||||||
@@ -172,30 +305,63 @@ set modelines=1
|
|||||||
|
|
||||||
let g:nickID = "hasufell"
|
let g:nickID = "hasufell"
|
||||||
|
|
||||||
|
" don't yank to buffer on deletion
|
||||||
|
" vnoremap d "_d
|
||||||
|
" nnoremap d "_d
|
||||||
|
vnoremap x "_x
|
||||||
|
nnoremap x "_x
|
||||||
|
|
||||||
" haskellmode, needs to load early
|
" Syntax
|
||||||
let g:haddock_browser='/usr/bin/firefox'
|
syntax on
|
||||||
let g:haddock_browser_callformat='%s file://%s >/dev/null 2>&1 &'
|
|
||||||
|
" pane navigation
|
||||||
|
" Use ctrl-[hjkl] to select the active split!
|
||||||
|
let g:C_Ctrl_j = 'off'
|
||||||
|
let g:BASH_Ctrl_j = 'off'
|
||||||
|
|
||||||
|
try
|
||||||
|
lang en_US
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
|
|
||||||
|
" ==========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
|
||||||
|
|
||||||
|
if has("nvim")
|
||||||
|
if exists('g:GtkGuiLoaded')
|
||||||
|
let g:neosolarized_contrast = "normal"
|
||||||
|
let g:neosolarized_visibility = "normal"
|
||||||
|
let g:neosolarized_vertSplitBgTrans = 0
|
||||||
|
let g:neosolarized_bold = 1
|
||||||
|
let g:neosolarized_underline = 1
|
||||||
|
let g:neosolarized_italic = 1
|
||||||
|
set background=dark
|
||||||
|
colorscheme NeoSolarized
|
||||||
|
else
|
||||||
|
let g:neosolarized_contrast = "normal"
|
||||||
|
let g:neosolarized_visibility = "normal"
|
||||||
|
let g:neosolarized_vertSplitBgTrans = 0
|
||||||
|
let g:neosolarized_bold = 1
|
||||||
|
let g:neosolarized_underline = 1
|
||||||
|
let g:neosolarized_italic = 1
|
||||||
|
set background=dark
|
||||||
|
colorscheme NeoSolarized
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" ===========================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" ==== conque ====
|
|
||||||
" command aliases
|
|
||||||
call CmdAlias('t','tabnew')
|
|
||||||
" call CmdAlias('cmd','ConqueTermSplit')
|
|
||||||
" call CmdAlias('bash','ConqueTermSplit bash<CR>')
|
|
||||||
call CmdAlias('openall','tab sball')
|
|
||||||
call CmdAlias('stripw','call StripTrailingWhitespaces()<CR>')
|
|
||||||
call CmdAlias('hotkeys', 'tabnew ~/.vim/hotkeys')
|
|
||||||
call CmdAlias('TC', 'call ToggleComment()<CR>')
|
|
||||||
call CmdAlias('TF', 'call ToggleFoldText()<CR>')
|
|
||||||
call CmdAlias('ctags', '!/usr/bin/ctags -R --langmap=c:.c.h --c++-kinds=+p --c-kinds=+p+x --fields=+i+a+S+t+l+m+n --extra=+q .<CR>')
|
|
||||||
|
|
||||||
|
|
||||||
" cabbrev git Git
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" Disable annoying auto line break
|
" Disable annoying auto line break
|
||||||
fu! DisableBr()
|
fu! DisableBr()
|
||||||
@@ -235,61 +401,6 @@ endfunction
|
|||||||
" =======================
|
" =======================
|
||||||
|
|
||||||
|
|
||||||
" don't yank to buffer on deletion
|
|
||||||
" vnoremap d "_d
|
|
||||||
" nnoremap d "_d
|
|
||||||
vnoremap x "_x
|
|
||||||
nnoremap x "_x
|
|
||||||
|
|
||||||
" Syntax
|
|
||||||
syntax enable
|
|
||||||
|
|
||||||
|
|
||||||
" ==== delimitMate ====
|
|
||||||
let g:delimitMate_matchpairs = "(:),[:],{:}"
|
|
||||||
let g:delimitMate_expand_cr = 1
|
|
||||||
let g:delimitMate_expand_space = 1
|
|
||||||
let g:delimitMate_autoclose = 1
|
|
||||||
|
|
||||||
|
|
||||||
" pane navigation
|
|
||||||
" Use ctrl-[hjkl] to select the active split!
|
|
||||||
let g:C_Ctrl_j = 'off'
|
|
||||||
let g:BASH_Ctrl_j = 'off'
|
|
||||||
|
|
||||||
|
|
||||||
" ==========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
|
|
||||||
" colorscheme dante
|
|
||||||
endif
|
|
||||||
" ===========================
|
|
||||||
|
|
||||||
" Solarized stuff
|
|
||||||
" let g:solarized_termtrans=0
|
|
||||||
" let g:solarized_degrade=0
|
|
||||||
" let g:solarized_bold=1
|
|
||||||
" let g:solarized_underline=1
|
|
||||||
" let g:solarized_italic=1
|
|
||||||
" let g:solarized_termcolors=16
|
|
||||||
" let g:solarized_contrast="normal"
|
|
||||||
let g:solarized_visibility="high"
|
|
||||||
" let g:solarized_diffmode="normal"
|
|
||||||
" let g:solarized_hitrail=0
|
|
||||||
let g:solarized_menu=1
|
|
||||||
|
|
||||||
try
|
|
||||||
lang en_US
|
|
||||||
catch
|
|
||||||
endtry
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" ====== traling whitespace =====
|
" ====== traling whitespace =====
|
||||||
fun! ShowTrailingWhitespace(pattern)
|
fun! ShowTrailingWhitespace(pattern)
|
||||||
@@ -332,37 +443,6 @@ endfun
|
|||||||
" ===========================
|
" ===========================
|
||||||
|
|
||||||
|
|
||||||
" LSP
|
|
||||||
let g:LanguageClient_autoStart = 0
|
|
||||||
|
|
||||||
|
|
||||||
" youcompleteme
|
|
||||||
let g:ycm_filetype_blacklist = {
|
|
||||||
\ 'notes' : 1,
|
|
||||||
\ 'markdown' : 1,
|
|
||||||
\ 'text' : 1,
|
|
||||||
\ 'java' : 1,
|
|
||||||
\}
|
|
||||||
let g:ycm_confirm_extra_conf = 0
|
|
||||||
let g:ycm_global_ycm_extra_conf='~/.vim/.ycm_extra_conf.py'
|
|
||||||
let g:ycm_collect_identifiers_from_tags_files = 1
|
|
||||||
let g:ycm_seed_identifiers_with_syntax = 0
|
|
||||||
" let g:ycm_always_populate_location_list = 1
|
|
||||||
let g:ycm_autoclose_preview_window_after_completion = 1
|
|
||||||
let g:ycm_key_invoke_completion = '<C-Space>'
|
|
||||||
let g:ycm_key_list_select_completion = ['<TAB>']
|
|
||||||
let g:ycm_key_list_previous_completion = ['<S-TAB>']
|
|
||||||
" nnoremap <F4> :YcmCompleter GoToDefinition<CR>
|
|
||||||
let g:ycm_server_log_level = 'error'
|
|
||||||
let g:ycm_semantic_triggers = {'haskell' : ['. ', '$ ']}
|
|
||||||
let g:ycm_goto_buffer_command = 'horizontal-split'
|
|
||||||
|
|
||||||
|
|
||||||
" commenting
|
|
||||||
let NERDSpaceDelims=1
|
|
||||||
let NERDCreateDefaultMappings=0
|
|
||||||
|
|
||||||
|
|
||||||
" comment hiding
|
" comment hiding
|
||||||
func! IsComment( lnum )
|
func! IsComment( lnum )
|
||||||
return synIDattr(synID(a:lnum, match(getline(a:lnum),'\S')+1, 1),"name") =~? 'comment'
|
return synIDattr(synID(a:lnum, match(getline(a:lnum),'\S')+1, 1),"name") =~? 'comment'
|
||||||
|
|||||||
Reference in New Issue
Block a user