From 3ddc15292dc8ca743f04829a05d38f01c310e864 Mon Sep 17 00:00:00 2001 From: David Aizenberg Date: Thu, 20 Feb 2020 05:38:06 +0200 Subject: [PATCH] fix da thing --- .vimrc | 184 ------------------------------------------------------- setup.sh | 2 +- 2 files changed, 1 insertion(+), 185 deletions(-) diff --git a/.vimrc b/.vimrc index 69dd45b..74aeb4a 100644 --- a/.vimrc +++ b/.vimrc @@ -12,33 +12,9 @@ set nocompatible | filetype indent plugin on | syn on set runtimepath^=~/.vim/bundle/ctrlp.vim let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] -fun! SetupVAM() - let c = get(g:, 'vim_addon_manager', {}) - let g:vim_addon_manager = c - let c.plugin_root_dir = expand('$HOME', 1) . '/.vim/vim-addons' - - " Force your ~/.vim/after directory to be last in &rtp always: - " let g:vim_addon_manager.rtp_list_hook = 'vam#ForceUsersAfterDirectoriesToBeLast' - - " most used options you may want to use: - " let c.log_to_buf = 1 - " let c.auto_install = 0 - let &rtp.=(empty(&rtp)?'':',').c.plugin_root_dir.'/vim-addon-manager' - if !isdirectory(c.plugin_root_dir.'/vim-addon-manager/autoload') - execute '!git clone --depth=1 git://github.com/MarcWeber/vim-addon-manager ' - \ shellescape(c.plugin_root_dir.'/vim-addon-manager', 1) - endif - - " This provides the VAMActivate command, you could be passing plugin names, too - call vam#ActivateAddons([], {}) -endfun -call SetupVAM() - - " Turn syntax highlight on. syntax on - "for future use. let mapleader = "," @@ -110,163 +86,3 @@ set t_Co=256 colorscheme mustang -" COC -" if hidden is not set, TextEdit might fail. -set hidden - -" Some servers have issues with backup files, see #649 -set nobackup -set nowritebackup - -" Better display for messages -set cmdheight=2 - -" Smaller updatetime for CursorHold & CursorHoldI -set updatetime=300 - -" don't give |ins-completion-menu| messages. -set shortmess+=c - -" always show signcolumns -"set signcolumn=yes - -" assuming you want to use snipmate snippet engine -ActivateAddons vim-snippets snipmate - - -" Use for trigger snippet expand. -imap (coc-snippets-expand) - -" Use for select text for visual placeholder of snippet. -vmap (coc-snippets-select) - -" Use for jump to next placeholder, it's default of coc.nvim -let g:coc_snippet_next = '' - -" Use for jump to previous placeholder, it's default of coc.nvim -let g:coc_snippet_prev = '' - -" Use for both expand and jump (make expand higher priority.) -imap (coc-snippets-expand-jump) - -inoremap - \ pumvisible() ? coc#_select_confirm() : - \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : - \ check_back_space() ? "\" : - \ coc#refresh() - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -let g:coc_snippet_next = '' - -" Use tab for trigger completion with characters ahead and navigate. -" Use command ':verbose imap ' to make sure tab is not mapped by other plugin. -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? "\" : "\" - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" Use to trigger completion. -inoremap coc#refresh() - -" Use to confirm completion, `u` means break undo chain at current position. -" Coc only does snippet and additional edit on confirm. -inoremap pumvisible() ? "\" : "\u\" - -" Use `[c` and `]c` to navigate diagnostics -nmap [c (coc-diagnostic-prev) -nmap ]c (coc-diagnostic-next) - -" Remap keys for gotos -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use K to show documentation in preview window -nnoremap K :call show_documentation() - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - else - call CocAction('doHover') - endif -endfunction - -" Highlight symbol under cursor on CursorHold -autocmd CursorHold * silent call CocActionAsync('highlight') - -" Remap for rename current word -nmap rn (coc-rename) - -" Remap for format selected region -xmap f (coc-format-selected) -nmap f (coc-format-selected) - -augroup mygroup - autocmd! - " Setup formatexpr specified filetype(s). - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - " Update signature help on jump placeholder - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -augroup end - -" Remap for do codeAction of selected region, ex: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) - -" Remap for do codeAction of current line -nmap ac (coc-codeaction) -" Fix autofix problem of current line -nmap qf (coc-fix-current) - -" Use `:Format` to format current buffer -command! -nargs=0 Format :call CocAction('format') - -" Use `:Fold` to fold current buffer -command! -nargs=? Fold :call CocAction('fold', ) - -" use `:OR` for organize import of current buffer -command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') - -" Add diagnostic info for https://github.com/itchyny/lightline.vim -let g:lightline = { - \ 'colorscheme': 'wombat', - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], - \ [ 'cocstatus', 'readonly', 'filename', 'modified' ] ] - \ }, - \ 'component_function': { - \ 'cocstatus': 'coc#status' - \ }, - \ } - - - -" Using CocList -" Show all diagnostics -nnoremap a :CocList diagnostics -" Manage extensions -nnoremap e :CocList extensions -" Show commands -nnoremap c :CocList commands -" Find symbol of current document -nnoremap o :CocList outline -" Search workspace symbols -nnoremap s :CocList -I symbols -" Do default action for next item. -nnoremap j :CocNext -" Do default action for previous item. -nnoremap k :CocPrev -" Resume latest coc list -nnoremap p :CocListResume diff --git a/setup.sh b/setup.sh index d2e6565..0e424a3 100755 --- a/setup.sh +++ b/setup.sh @@ -1,4 +1,4 @@ -#/bin/bash +#!/bin/bash GREEN='\033[0;32m' RESET='\033[0m'