Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " download this script "wget -O ~/.vimrc pastebin.com/raw/gNS9qm63"
- " some settings
- :set backspace=indent,eol,start
- set number
- set nocursorline
- set nocursorcolumn
- set wrap
- set noexpandtab
- set showmode
- " syntax higlighting:
- syntax on
- filetype on
- filetype plugin on
- filetype indent on
- " higlighting while search
- set incsearch
- set showmatch
- set hlsearch
- set history=1000
- set wildmenu
- set wildmode=list:longest
- set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx
- " You can split a window into sections by typing `:split` or `:vsplit`.
- " Display cursorline and cursorcolumn ONLY in active window.
- augroup cursor_off
- autocmd!
- autocmd WinLeave * set nocursorline nocursorcolumn
- autocmd WinEnter * set cursorline cursorcolumn
- augroup END
- "the plugin is from "curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
- call plug#begin('~/.vim/plugged')
- Plug 'neoclide/coc.nvim', {'branch': 'release'}
- "Plug 'cdelledonne/vim-cmake'
- call plug#end()
- "Configs for coc
- " Use tab for trigger completion with characters ahead and navigate.
- " NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
- " other plugin before putting this into your config.
- " Make <CR> to accept selected completion item or notify coc.nvim to format
- " <C-g>u breaks current undo, please make your own choice.
- inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
- \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
- " Use <c-space> to trigger completion.
- if has('nvim')
- inoremap <silent><expr> <c-space> coc#refresh()
- else
- inoremap <silent><expr> <c-@> coc#refresh()
- endif
- " Use K to show documentation in preview window.
- nnoremap <silent> K :call ShowDocumentation()<CR>
- function! ShowDocumentation()
- if CocAction('hasProvider', 'hover')
- call CocActionAsync('doHover')
- else
- call feedkeys('K', 'in')
- endif
- endfunction
- " Map function and class text objects
- " NOTE: Requires 'textDocument.documentSymbol' support from the language server.
- xmap if <Plug>(coc-funcobj-i)
- omap if <Plug>(coc-funcobj-i)
- xmap af <Plug>(coc-funcobj-a)
- omap af <Plug>(coc-funcobj-a)
- xmap ic <Plug>(coc-classobj-i)
- omap ic <Plug>(coc-classobj-i)
- xmap ac <Plug>(coc-classobj-a)
- omap ac <Plug>(coc-classobj-a)
- " Remap <C-f> and <C-b> for scroll float windows/popups.
- if has('nvim-0.4.0') || has('patch-8.2.0750')
- nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
- nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
- inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
- inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
- vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
- vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
- endif
- "to really foce it
- "verbose set noexpandtab
- set nocursorline
- set nocursorcolumn
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement