Skip to content

Instantly share code, notes, and snippets.

@Bruce0203
Last active February 8, 2024 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bruce0203/fb55ea6cdad7cf1fc2834734c3881ab4 to your computer and use it in GitHub Desktop.
Save Bruce0203/fb55ea6cdad7cf1fc2834734c3881ab4 to your computer and use it in GitHub Desktop.
init.vim
syntax enable
filetype plugin indent on
call plug#begin('~/.vim/plugged')
Plug 'preservim/nerdtree'
Plug 'preservim/tagbar'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'vim-airline/vim-airline'
Plug 'frazrepo/vim-rainbow'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'rust-lang/rust.vim'
call plug#end()
" :nmap <Tab> :NERDTreeToggle<CR>
:set modifiable
inoremap <silent><expr> <c-space> coc#refresh()
" Make <CR> to accept selected completion item or notify coc.nvim to format
" <C-g>u breaks current undo, please make your own choice
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
function! ToggleNERDTree()
" NERDTree가 실행중인지 확인합니다.
if exists("g:NERDTree") && g:NERDTree.IsOpen()
" NERDTree가 열려있다면 닫습니다.
NERDTreeClose
else
" 그렇지 않다면 NERDTree를 엽니다.
NERDTreeToggle
endif
endfunction
" Tab 키에 ToggleNERDTree 함수를 매핑합니다.
nnoremap <Tab> :call ToggleNERDTree()<CR>
let g:NERDTreeMinimalMenu=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment