Last active
April 6, 2020 04:47
-
-
Save dnavas77/6909f8fb5f329915124963020ded8802 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" path: home\appdata\local\nvim\ginit.vim | |
filetype off | |
syntax off | |
if &compatible | |
set nocompatible | |
endif | |
" Add the dein installation directory into runtimepath | |
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim | |
if dein#load_state('~/.cache/dein') | |
call dein#begin('~/.cache/dein') | |
call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim') | |
call dein#add('Shougo/deoplete.nvim') | |
call dein#add('preservim/nerdtree') | |
call dein#add('itchyny/lightline.vim') | |
call dein#add('chriskempson/base16-vim') | |
call dein#add('junegunn/fzf') | |
call dein#add('tpope/vim-fugitive') | |
call dein#add('jiangmiao/auto-pairs') | |
if !has('nvim') | |
call dein#add('roxma/nvim-yarp') | |
call dein#add('roxma/vim-hug-neovim-rpc') | |
endif | |
call dein#end() | |
call dein#save_state() | |
endif | |
filetype plugin indent on | |
syntax enable | |
GuiTabline 0 | |
call GuiFont("Consolas:h12") | |
" Set NeoVim Settings | |
set termguicolors | |
set backspace=indent,eol,start | |
set shortmess=atI "don't show message at startup | |
set title "show filename in widow titlebar | |
set clipboard+=unnamedplus "allow copy from vim and paste into system | |
set autoindent | |
set smartindent | |
set lazyredraw | |
set nobackup | |
set nowb | |
set history=10000 | |
set noswapfile | |
set laststatus=2 | |
set noshowmode | |
set smarttab | |
set linebreak | |
set cindent | |
set showmatch | |
set mat=2 | |
set cc=100 | |
set textwidth=100 | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set nowrap | |
set ignorecase | |
set smartcase | |
set hlsearch | |
set wildmenu | |
set modifiable | |
set belloff=all | |
"set number | |
set cursorline | |
set foldmethod=indent | |
set foldlevel=99 | |
set fillchars+=stl:\ ,stlnc:\ | |
set timeoutlen=500 ttimeoutlen=500 | |
"set relativenumber | |
"set linespace=5 | |
"set cursorcolumn | |
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe " Windows | |
set wildignore+=**\\node_modules " ignores node_modules | |
set wildignore+=**\\bower_components " ignores bower_components | |
set wildignore+=**\\tmp "ignores tmp folder | |
set wildignore+=**\\dist "ignores dist folder (ember) | |
" Highlight whitespace | |
highlight BadWhitespace ctermbg=red guibg=darkred | |
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h,*.hbs,*.js,*.elm,*.go match BadWhitespace /\s\+$/ | |
" Enable Vim Tag Matching | |
"runtime macros/matchit.vim | |
" cd sets path to the path of the file in the current buffer. | |
nnoremap cd :cd %:p:h | |
" Better indentation | |
vnoremap < <gv | |
vnoremap > >gv | |
"~~~~~~~~~~~~~~~~~ DANI's SHORTCUTS / KEYBINDINGS | |
let mapleader = ';' | |
map q <Nop> | |
nnoremap <leader>rv :source $MYVIMRC<CR> | |
nnoremap <leader>av :tabnew $MYVIMRC<CR> | |
nmap <silent> <leader>a <Plug>(ale_next_wrap) | |
nnoremap <leader>d :bnext<CR> | |
nnoremap <leader>t :tabnew<CR> | |
nnoremap <leader>q :bw<CR> | |
nnoremap <leader>w :q<CR> | |
nnoremap <leader>h :sp<CR> | |
nnoremap <leader>v :vsp<CR> | |
nnoremap <S-n> :tabprevious<CR> | |
nnoremap <S-m> :tabnext<CR> | |
nnoremap <space><space> :w<CR> | |
nnoremap <space> :set hlsearch! hlsearch?<CR> | |
" Maps Shift + [h,j,k,l] to resize splits | |
map <silent> <S-H> <C-w>< | |
map <silent> <S-J> <C-W>+ | |
map <silent> <S-K> <C-W>- | |
map <silent> <S-L> <C-w>> | |
" Switch between opened buffers splits by holding Ctrl and using HJKL | |
nnoremap <C-J> <C-W>j | |
nnoremap <C-K> <C-W>k | |
nnoremap <C-L> <C-W>l | |
nnoremap <C-H> <C-W>h | |
"~~~~~~ Open Nerdtree with Ctrl + n | |
set autochdir | |
map <C-n> :NERDTreeToggle<CR> | |
let NERDTreeChDirMode=2 | |
let NERDTreeShowHidden=1 | |
nnoremap t :NERDTree %:p:h | |
"~~~~~~~ Deoplete | |
let g:deoplete#enable_at_startup = 1 | |
let g:python3_host_prog = 'C:\Python38\python.exe' | |
let g:deoplete#file#enable_buffer_path = 1 | |
"~~~~~~~ fZf | |
nnoremap <silent> <leader>f :FZF<CR> | |
nnoremap <silent> <leader>F :FZF ~<CR> | |
"~~~~~~~~~ Plugin LIGHT LINE | |
let g:lightline = { | |
\ 'colorscheme': 'wombat', | |
\ 'active': { | |
\ 'left': [ [ 'mode', 'paste' ], | |
\ [ 'fugitive', 'readonly', 'filename', 'modified'] ], | |
\ 'right': [[ 'lineinfo' ], | |
\ [ 'fileencoding'], | |
\ [ 'ale' ] ] | |
\ }, | |
\ 'component': { | |
\ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}', | |
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}', | |
\ 'ale': '%{ALEGetStatusLine()}', | |
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}' | |
\ }, | |
\ 'component_visible_condition': { | |
\ 'readonly': '(&filetype!="help"&& &readonly)', | |
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))', | |
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())' | |
\ } | |
\ } | |
" Set theme | |
set background=dark | |
colorscheme base16-gruvbox-dark-medium |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment