Last active
March 6, 2020 12:08
Neovim config `~/.config/nvim/init.vim`
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
set runtimepath^=~/.vim runtimepath+=~/.vim/after | |
let &packpath = &runtimepath | |
source ~/.vimrc | |
set clipboard=unnamedplus "sets the default copy register to be + | |
" Specify a directory for plugins | |
" - For Neovim: stdpath('data') . '/plugged' | |
" - Avoid using standard Vim directory names like 'plugin' | |
call plug#begin('~/.vim/plugged') | |
" Make sure you use single quotes | |
Plug 'dag/vim-fish' | |
Plug 'vim-ruby/vim-ruby' | |
Plug '/usr/local/opt/fzf' | |
Plug 'junegunn/fzf.vim' | |
Plug 'itchyny/lightline.vim' | |
" Initialize plugin system | |
call plug#end() | |
let g:lightline = { | |
\ 'component_function': { | |
\ 'filename': 'LightlineFilename', | |
\ } | |
\ } | |
function! LightlineFilename() | |
let root = fnamemodify(get(b:, 'git_dir'), ':h') | |
let path = expand('%:p') | |
if path[:len(root)-1] ==# root | |
return path[len(root)+1:] | |
endif | |
return expand('%') | |
endfunction | |
nnoremap <esc> :noh<return><esc> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment