Skip to content

Instantly share code, notes, and snippets.

@xykj61
Last active April 25, 2022 00:07
Show Gist options
  • Save xykj61/a741d9b935d22a738b78cb9eb2dcbc08 to your computer and use it in GitHub Desktop.
Save xykj61/a741d9b935d22a738b78cb9eb2dcbc08 to your computer and use it in GitHub Desktop.
neovim init (~/.config/nvim/init.vim)
"" vim-plug
" vim-plug auto-install if src not found.
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Plugins will be downloaded under the specified directory.
call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
" Declare the list of plugins.
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/seoul256.vim'
Plug 'junegunn/vim-easy-align'
Plug 'Olical/conjure'
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
Plug 'tpope/vim-sensible'
Plug 'vim-scripts/paredit.vim'
" List ends here. Plugins become visible to Vim after this call.
call plug#end()
"" ~/.config/neovim/init.vim
""" hey-kader presets
set omnifunc=syntaxcomplete#Complete
set ruler
set shiftwidth=2
set tabstop=2
set background=light
set smarttab
set incsearch
set hls
set nocp
set ea
set ch=2
"auto balance parens and quotes
"inoremap " ""<left>
"inoremap ' ''<left>
"inoremap ( ()<left>
"inoremap [ []<left>
"inoremap { {}<left>
inoremap {<CR> {<CR>}<ESC>O
inoremap {;<CR> {<CR>};<ESC>O
"easily split screen toggle"
nmap <C-h> <C-w>h
nmap <C-j> <C-w>j
nmap <C-k> <C-w>k
nmap <C-l> <C-w>l
"inoremap \#\!lua #/lua<cr><up>
let g:netrw_ftpmode = "ascii"
let g:netrw_menu=0
"""
"" nerdtree
" nnoremap <leader>n :NERDTreeFocus<CR>
" nnoremap <C-n> :NERDTree<CR>
" nnoremap <C-t> :NERDTreeToggle<CR>
" nnoremap <C-f> :NERDTreeFind<CR>
"
" " Start NERDTree and leave the cursor in it.
" autocmd VimEnter * NERDTree
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment