Skip to content

Instantly share code, notes, and snippets.

@pawelztef
Created February 24, 2019 17:24
Show Gist options
  • Select an option

  • Save pawelztef/a658ead93222ad6fd186d97f36e72852 to your computer and use it in GitHub Desktop.

Select an option

Save pawelztef/a658ead93222ad6fd186d97f36e72852 to your computer and use it in GitHub Desktop.
neovim config
call plug#begin('~/.local/share/nvim/plugged')
Plug 'junegunn/vim-easy-align'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'jeffkreeftmeijer/vim-numbertoggle'
Plug 'mattn/emmet-vim'
Plug '907th/vim-auto-save'
Plug 'vim-scripts/restore_view.vim'
Plug 'fxn/vim-monochrome'
Plug 'gosukiwi/vim-atom-dark'
Plug 'itchyny/lightline.vim'
Plug 'dracula/vim'
Plug 'rbgrouleff/bclose.vim'
Plug 'francoiscabrol/ranger.vim'
Plug 'mileszs/ack.vim'
Plug 'jwalton512/vim-blade'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-bundler'
" Plug 'vim-syntastic/syntastic'
Plug 'https://github.com/adelarsq/vim-matchit'
Plug 'Yggdroot/indentLine'
Plug 'terryma/vim-multiple-cursors'
Plug 'airblade/vim-gitgutter'
Plug 'honza/vim-snippets'
Plug 'SirVer/ultisnips'
Plug 'Shougo/deoplete.nvim'
Plug 'easymotion/vim-easymotion'
Plug 'dkprice/vim-easygrep'
call plug#end()
let g:python_host_prog = '/usr/bin/python'
let g:python3_host_prog = '/usr/bin/python3'
"-------------------------------------------------------------------------
" Basic settings
"-------------------------------------------------------------------------
" autocmd FileType c,java,cpp,python,ruby,json setlocal foldmethod=syntax
set synmaxcol=128
syntax sync minlines=256
set lazyredraw
let mapleader = "\<Space>"
"colorscheme monochrome
colorscheme atom-dark-256
hi CursorLine cterm=NONE ctermbg=gray ctermfg=white
set cursorline
nnoremap <Leader>c :set cursorline!<CR>
set scrolloff=25
set autoread
au CursorHold * checktime
set mouse=a
set nohlsearch
syntax on
set ruler
set cmdheight=1
set nowrap
set linebreak
set expandtab
set softtabstop=2
set shiftwidth=2
"---------------------------------------------------------------------------
" Basic mapping
"---------------------------------------------------------------------------
"horizonatal split
" nnoremap <Leader>h <C-W>s
"vertial split
nnoremap <Leader>v <C-W>v
nnoremap <silent> <Leader>= :exe "vertical resize " . (winheight(0) * 3/2)<CR>
nnoremap <silent> <Leader>- :exe "vertical resize " . (winheight(0) * 2/3)<CR>
"moving among open windows
nmap <Leader>m <C-W>w
"closing
nnoremap <Leader>q :q<CR>
"mapping for indenting
nmap <F7> mzgg=G`z
imap <F7> <Esc>mzgg=G`zi
"mapping for opening new line without entering into insert mode
nmap oo o<Esc>k
nmap OO O<Esc>j
" mapping for folding
set foldmethod=manual
inoremap <F9> <C-O>za
nnoremap <F9> za
onoremap <F9> <C-C>za
vnoremap <F9> zf
"insert new line just after cursor without entering into insert mode before
nnoremap , i<cr><Esc>k$
" mapping for folding
set foldmethod=manual
inoremap <F9> <C-O>za
nnoremap <F9> za
onoremap <F9> <C-C>za
vnoremap <F9> zf
"---------------------------------------------------------------------------
" Caret settings
" --------------------------------------------------------------------------
"highlight Cursor guifg=white guibg=white
"highlight iCursor guifg=white guibg=white
"set guicursor=n-v-c:block-Cursor
"set guicursor+=i:ver100-iCursor
"set guicursor+=n-v-c:blinkon0
"set guicursor+=i:blinkwait10
"---------------------------------------------------------------------------
" Lightline
"---------------------------------------------------------------------------
let g:lightline = { 'colorscheme': 'wombat', }
set noshowmode
"---------------------------------------------------------------------------
" View-save for for saving folds
"---------------------------------------------------------------------------
set viewoptions=cursor,folds,slash,unix
" let g:skipview_files = ['*\.vim']
"-------------------------------------------------------------------------
" Ack
"------------------------------------------------------------------------
let g:ackprg = 'ag --nogroup --nocolor --column'
map <Leader>a :Ack!<Space>
"---------------------------------------------------------------------------
" FzF
"---------------------------------------------------------------------------
nnoremap <C-p> :Files<cr>
nnoremap <C-b> :Buffers<cr>
let g:fzf_tags_command = 'ctags --extra=+f -R'
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'hl': ['fg', 'Comment'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Statement'],
\ 'info': ['fg', 'PreProc'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'vsplit' }
let g:fzf_layout = { 'down': '~30%' }
"---------------------------------------------------------------------------
" Emmet
"---------------------------------------------------------------------------
let g:user_emmet_leader_key = '<tab>.'
"-------------------------------------------------------------------------
" AutoSave - automatically save changes to disk without having to use :w
"-------------------------------------------------------------------------
let g:auto_save = 1
let g:auto_save_no_updatetime = 1
let g:auto_save_in_insert_mode = 0
"---------------------------------------------------------------------------
" Blade
"---------------------------------------------------------------------------
" Define some single Blade directives. This variable is used for highlighting only.
let g:blade_custom_directives = ['datetime', 'javascript']
" Define pairs of Blade directives. This variable is used for highlighting and indentation.
let g:blade_custom_directives_pairs = {
\ 'markdown': 'endmarkdown',
\ 'cache': 'endcache',
\ }
"-----------------------------------------------------------------------------
" Ranger
"-----------------------------------------------------------------------------
" nnoremap <Leader>n :tabe %:p:h<cr>
" map <leader>n :Ranger<CR>
map <leader>n :RangerWorkingDirectory<CR>
"-------------------------------------------------------------------------
" Deoplete
"-------------------------------------------------------------------------
" " Use deoplete.
" let g:deoplete#enable_at_startup = 1
" call deoplete#custom#set('ultisnips', 'matchers', ['matcher_fuzzy'])
" let g:deoplete#omni#functions = {}
" let g:deoplete#sources = {}
" let g:deoplete#sources['javascript.jsx'] = ['file', 'ultisnips', ]
"---------------------------------------------------------------------------
" NumberToggle
"---------------------------------------------------------------------------
set number relativenumber
nnoremap <silent> <C-l> :set relativenumber!<cr>
"---------------------------------------------------------------------------
" syntastic
"---------------------------------------------------------------------------
" set statusline+=%#warningmsg#
" set statusline+=%{SyntasticStatuslineFlag()}
" set statusline+=%*
" let g:syntastic_always_populate_loc_list = 1
" let g:syntastic_auto_loc_list = 0
" let g:syntastic_check_on_open = 1
" let g:syntastic_check_on_wq = 0
" let g:syntastic_auto_jump = 0
" let g:syntastic_mode_map = { 'passive_filetypes': ['sass', 'scss', 'java'] }
"-----------------------------------------------------------------------------
"IndentLine
"--------------------------------------------------------------------------
nnoremap <Leader>x :IndentLinesToggle<CR>
let g:indentLine_faster = 1
let g:indentLine_enabled = 0
"let g:indentLine_leadingSpaceChar = '·'
"let g:indentLine_leadingSpaceEnabled = 1
let g:indentLine_indentLevel = 60
"-----------------------------------------------------------------------------
"UltiSnips
"--------------------------------------------------------------------------
" let g:UltiSnipsExpandTrigger="<tab>"
" let g:UltiSnipsJumpForwardTrigger="<c-b>"
" let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" let g:UltiSnipsEditSplit="vertical"
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsEditSplit="vertical"
let g:UltiSnipsListSnippets="<c-j-s>"
"-------------------------------------------------------------------------
" Easymotion
"-------------------------------------------------------------------------
" let g:EasyMotion_do_mapping = 0 " Disable default mappings
" Jump to anywhere you want with minimal keystrokes, with just one key binding.
" `s{char}{label}`
" nmap s <Plug>(easymotion-overwin-f)
" or
" `s{char}{char}{label}`
" Need one more keystroke, but on average, it may be more comfortable.
nmap s <Plug>(easymotion-overwin-f2)
" Turn on case insensitive feature
let g:EasyMotion_smartcase = 1
" keep cursor column when JK motion
let g:EasyMotion_startofline = 0
" JKLH motions: Line motions
map <Leader>j <Plug>(easymotion-j)
map <Leader>k <Plug>(easymotion-k)
map <Leader>l <Plug>(easymotion-lineforward)
map <Leader>h <Plug>(easymotion-linebackward)
"-------------------------------------------------------------------------
" GitGutter
"-------------------------------------------------------------------------
" disabling mappings
let g:gitgutter_map_keys = 0
"
"-------------------------------------------------------------------------
" Fugitive
"-------------------------------------------------------------------------
"
set previewheight=20
"
"
" $NVIM_TUI_ENABLE_CURSOR_SHAPE=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment