Fern
This commit is contained in:
parent
e60e881215
commit
d6c5b475a1
55
.vimrc
55
.vimrc
|
@ -5,6 +5,7 @@
|
||||||
" || | || || || || || ||
|
" || | || || || || || ||
|
||||||
" \\/ \\ \\ \\ \\ \\, \\,/
|
" \\/ \\ \\ \\ \\ \\, \\,/
|
||||||
|
|
||||||
|
|
||||||
" Install VimPlug
|
" Install VimPlug
|
||||||
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
||||||
if empty(glob(data_dir . '/autoload/plug.vim'))
|
if empty(glob(data_dir . '/autoload/plug.vim'))
|
||||||
|
@ -22,27 +23,31 @@ Plug 'dhruvasagar/vim-table-mode'
|
||||||
Plug 'fadein/vim-FIGlet'
|
Plug 'fadein/vim-FIGlet'
|
||||||
Plug 'gkeep/iceberg-dark'
|
Plug 'gkeep/iceberg-dark'
|
||||||
Plug 'itchyny/lightline.vim'
|
Plug 'itchyny/lightline.vim'
|
||||||
Plug 'jistr/vim-nerdtree-tabs'
|
|
||||||
Plug 'karolbelina/uxntal.vim', {'for': 'uxntal'}
|
Plug 'karolbelina/uxntal.vim', {'for': 'uxntal'}
|
||||||
|
Plug 'lambdalisue/fern-git-status.vim'
|
||||||
|
Plug 'lambdalisue/fern-hijack.vim'
|
||||||
|
Plug 'lambdalisue/fern-renderer-nerdfont.vim'
|
||||||
|
Plug 'lambdalisue/fern.vim'
|
||||||
Plug 'lilydjwg/colorizer'
|
Plug 'lilydjwg/colorizer'
|
||||||
Plug 'mg979/vim-visual-multi'
|
Plug 'mg979/vim-visual-multi'
|
||||||
Plug 'owickstrom/vim-colors-paramount'
|
Plug 'owickstrom/vim-colors-paramount'
|
||||||
Plug 'raimondi/delimitmate'
|
Plug 'raimondi/delimitmate'
|
||||||
Plug 'scrooloose/nerdtree'
|
|
||||||
Plug 'tpope/vim-commentary'
|
Plug 'tpope/vim-commentary'
|
||||||
Plug 'vim-scripts/nginx.vim', {'for': 'nginx'}
|
Plug 'vim-scripts/nginx.vim', {'for': 'nginx'}
|
||||||
Plug 'yuttie/comfortable-motion.vim'
|
Plug 'yuttie/comfortable-motion.vim'
|
||||||
|
|
||||||
|
Plug 'lambdalisue/nerdfont.vim'
|
||||||
Plug 'ryanoasis/vim-devicons'
|
Plug 'ryanoasis/vim-devicons'
|
||||||
|
|
||||||
" don't install these plugins on remote servers
|
" don't install these plugins on remote servers
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
|
Plug 'airblade/vim-gitgutter'
|
||||||
Plug 'folke/todo-comments.nvim'
|
Plug 'folke/todo-comments.nvim'
|
||||||
Plug 'hrsh7th/cmp-calc'
|
Plug 'hrsh7th/cmp-calc'
|
||||||
Plug 'j-hui/fidget.nvim'
|
Plug 'j-hui/fidget.nvim'
|
||||||
Plug 'jghauser/mkdir.nvim'
|
Plug 'jghauser/mkdir.nvim'
|
||||||
Plug 'stevearc/dressing.nvim'
|
Plug 'stevearc/dressing.nvim'
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'williamboman/nvim-lsp-installer'
|
||||||
Plug 'antoinemadec/FixCursorHold.nvim'
|
Plug 'antoinemadec/FixCursorHold.nvim'
|
||||||
Plug 'edluffy/specs.nvim'
|
Plug 'edluffy/specs.nvim'
|
||||||
Plug 'folke/lsp-colors.nvim'
|
Plug 'folke/lsp-colors.nvim'
|
||||||
|
@ -56,14 +61,12 @@ if has('nvim')
|
||||||
Plug 'hrsh7th/vim-vsnip'
|
Plug 'hrsh7th/vim-vsnip'
|
||||||
Plug 'kyazdani42/nvim-web-devicons'
|
Plug 'kyazdani42/nvim-web-devicons'
|
||||||
Plug 'maximbaz/lightline-ale'
|
Plug 'maximbaz/lightline-ale'
|
||||||
Plug 'williamboman/nvim-lsp-installer'
|
|
||||||
Plug 'neovim/nvim-lspconfig'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
Plug 'nvim-telescope/telescope.nvim'
|
Plug 'nvim-telescope/telescope.nvim'
|
||||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||||
Plug 'tpope/vim-fugitive'
|
Plug 'tpope/vim-fugitive'
|
||||||
Plug 'w0rp/ale'
|
Plug 'w0rp/ale'
|
||||||
Plug 'xuyuanp/nerdtree-git-plugin'
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
@ -81,14 +84,50 @@ noremap <silent> <ScrollWheelUp> :call comfortable_motion#flick(-20)<CR>
|
||||||
let g:VM_maps = {}
|
let g:VM_maps = {}
|
||||||
let g:VM_maps["I BS"] = '<c-BS>'
|
let g:VM_maps["I BS"] = '<c-BS>'
|
||||||
|
|
||||||
" Nerdtree/git config
|
" Fern config
|
||||||
let g:NERDTreeGitStatusConcealBrackets = 1
|
let g:fern#renderer = "nerdfont"
|
||||||
|
|
||||||
|
function FindSessionDirectory() abort
|
||||||
|
if len(argv()) > 0
|
||||||
|
return fnamemodify(argv()[0], ':p:h')
|
||||||
|
endif
|
||||||
|
return getcwd()
|
||||||
|
endfunction!
|
||||||
|
|
||||||
|
function! s:init_fern() abort
|
||||||
|
nmap <buffer><expr>
|
||||||
|
\ <Plug>(fern-my-expand-or-collapse)
|
||||||
|
\ fern#smart#leaf(
|
||||||
|
\ "\<Plug>(fern-action-open)",
|
||||||
|
\ "\<Plug>(fern-action-expand)",
|
||||||
|
\ "\<Plug>(fern-action-collapse)",
|
||||||
|
\ )
|
||||||
|
|
||||||
|
" Define NERDTree like mappings
|
||||||
|
nmap <buffer> t <Plug>(fern-action-open:tabedit)
|
||||||
|
nmap <buffer> T <Plug>(fern-action-open:tabedit)gT
|
||||||
|
nmap <buffer> i <Plug>(fern-action-open:split)
|
||||||
|
nmap <buffer> gi <Plug>(fern-action-open:split)<C-w>p
|
||||||
|
nmap <buffer> s <Plug>(fern-action-open:vsplit)
|
||||||
|
nmap <buffer> gs <Plug>(fern-action-open:vsplit)<C-w>p
|
||||||
|
nmap <buffer> ma <Plug>(fern-action-new-path)
|
||||||
|
nmap <buffer> <CR> <Plug>(fern-my-expand-or-collapse)
|
||||||
|
nmap <buffer> P gg
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
augroup my-fern-startup
|
||||||
|
autocmd! *
|
||||||
|
autocmd FileType fern call s:init_fern()
|
||||||
|
if has('nvim')
|
||||||
|
autocmd TabNewEntered * ++nested exec 'Fern -reveal=% -drawer -stay ' . FindSessionDirectory()
|
||||||
|
endif
|
||||||
|
augroup END
|
||||||
|
|
||||||
" Aliases
|
" Aliases
|
||||||
command Header FIGlet -f Gothic
|
command Header FIGlet -f Gothic
|
||||||
cmap W w !sudo tee > /dev/null %
|
cmap W w !sudo tee > /dev/null %
|
||||||
nnoremap <C-e> :NERDTreeTabsToggle<CR>
|
" nnoremap <C-e> :NERDTreeTabsToggle<CR>
|
||||||
|
nnoremap <C-e> :exec ':Fern -reveal=% -drawer -toggle -stay ' . FindSessionDirectory()<CR>
|
||||||
|
|
||||||
" Colorscheme
|
" Colorscheme
|
||||||
set background=dark
|
set background=dark
|
||||||
|
|
Loading…
Reference in New Issue