Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """Vim-Plug"""""""""""""""""""""""""""""""""""""""
- call plug#begin()
- Plug 'scrooloose/nerdtree'
- Plug 'tpope/vim-commentary'
- Plug 'morhetz/gruvbox'
- Plug 'ervandew/supertab'
- Plug 'itchyny/lightline.vim'
- Plug '~/.fzf'
- Plug 'junegunn/fzf.vim'
- " Plug 'w0rp/ale'
- call plug#end()
- """Setting"""""""""""""""""""""""""""""""""""""""
- " set timeoutlen=1000 ttimeoutlen=0 "VIM ONLY --No delay switching modes--
- "--Sessions--
- " autocmd! VimLeave * mksession
- " autocmd! VimEnter * source ~/Session.vim
- "--Folding--
- " autocmd BufWinLeave *.* mkview
- " autocmd BufWinEnter *.* silent loadview"
- " set foldmethod=syntax "syntax highlighting items specify folds *SLOW
- " set foldcolumn=1 "defines 1 col at window left, to indicate folding
- " let javaScript_fold=1 "activate folding by JS syntax
- " set foldlevelstart=99 "start file with all folds opened
- "--Others--
- " set signcolumn=yes
- " set nu rnu
- " set nu
- set noshowmode
- set laststatus=2
- set noswapfile
- filetype plugin indent on
- set number relativenumber
- autocmd InsertEnter,InsertLeave * set cul! "Insert Cursor Highlingting"
- set termguicolors
- set background=light
- set showcmd " Show (partial) command in status line.
- set showmatch " Show matching brackets.
- set ignorecase " Do case insensitive matching
- set smartcase " Do smart case matching
- set incsearch " Incremental search (highlight during search)
- set autowrite " Automatically save before commands like :next and :make
- set hidden " Hide buffers when they are abandoned
- set mouse=a " Enable mouse usage (all modes)
- set nohlsearch
- set splitright
- set splitbelow
- "--Cursors--
- let &t_SI = "\<Esc>[5 q"
- let &t_SR = "\<Esc>[4 q"
- let &t_EI = "\<Esc>[2 q"
- "--Indentation--
- set shiftwidth=4
- set tabstop=4
- set list "Indent Guide"
- set listchars=tab:›\ ,trail:•,extends:#,nbsp:.
- """MAPPINGS""""""""""""""""""""""""""""""""""""""""
- "To use `ALT+{h,j,k,l}` to navigate windows from any mode:
- " tnoremap <A-h> <C-\><C-N><C-w>h
- " tnoremap <A-j> <C-\><C-N><C-w>j
- " tnoremap <A-k> <C-\><C-N><C-w>k
- " tnoremap <A-l> <C-\><C-N><C-w>l
- " inoremap <A-h> <C-\><C-N><C-w>h
- " inoremap <A-j> <C-\><C-N><C-w>j
- " inoremap <A-k> <C-\><C-N><C-w>k
- " inoremap <A-l> <C-\><C-N><C-w>l
- " nnoremap <A-h> <C-w>h
- " nnoremap <A-j> <C-w>j
- " nnoremap <A-k> <C-w>k
- " nnoremap <A-l> <C-w>l
- "map space to leader
- nnoremap <Space> <Nop>
- let mapleader = "\<Space>"
- noremap <leader>h :set hlsearch! hlsearch?<CR>
- inoremap jk <esc>
- "session
- map <F3> :mks!<CR>
- map <F5> :source ~/Session.vim<CR>
- "scrolling
- nnoremap <C-j> }
- nnoremap <C-k> {
- "line navigation
- nnoremap B ^
- nnoremap E $
- "---windows management----------
- map <C-w> :q!<CR>
- map <C-s> :w<CR>
- map <C-\> :vnew<CR>
- map <C-A-\> :new<CR>
- "switch between windows
- nnoremap <A-w> <C-w>w
- inoremap <A-w> <C-\><C-N><C-w>w
- tnoremap <A-w> <C-\><C-N><C-w>w
- "move windows
- nnoremap <C-A-h> <C-w>H
- nnoremap <C-A-j> <C-w>J
- nnoremap <C-A-k> <C-w>K
- nnoremap <C-A-l> <C-w>L
- tnoremap <C-A-h> <C-\><C-N><C-w>H
- tnoremap <C-A-j> <C-\><C-N><C-w>J
- tnoremap <C-A-k> <C-\><C-N><C-w>K
- tnoremap <C-A-l> <C-\><C-N><C-w>L
- inoremap <C-A-h> <C-\><C-N><C-w>H
- inoremap <C-A-j> <C-\><C-N><C-w>J
- inoremap <C-A-k> <C-\><C-N><C-w>K
- inoremap <C-A-l> <C-\><C-N><C-w>L
- "moving cursor insert mode
- inoremap <A-h> <C-\><C-N>ha
- inoremap <A-j> <C-\><C-N>ja
- inoremap <A-k> <C-\><C-N>ka
- inoremap <A-l> <C-\><C-N>la
- "resize windows
- nnoremap <A-h> :vertical resize -5<CR>
- nnoremap <A-j> :res -2<CR>
- nnoremap <A-k> :res +2<CR>
- nnoremap <A-l> :vertical resize +5<CR>
- tnoremap <A-h> :vertical resize -5<CR>
- tnoremap <A-j> :res -2<CR>
- tnoremap <A-k> :res +2<CR>
- tnoremap <A-l> :vertical resize +5<CR>
- "---plugins mapping----------
- "nerdTree
- map <C-n> :NERDTreeToggle<CR>
- "fzf
- map <C-f> :Files<CR>
- map <C-b> :Buffers<CR>
- map <C-h> :History<CR>
- map <C-l> :Lines<CR>
- map <C-m> :Marks<CR>
- "--SuperTab--
- let g:SuperTabDefaultCompletionType = "<c-n>"
- "--ALE--
- " nmap <silent> <C-k> <Plug>(ale_previous_wrap)
- " nmap <silent> <C-j> <Plug>(ale_next_wrap)
- """"PLUGINS SETTING""""""""""""""""""""""""""""""""""""""""
- "gruvbox
- let g:gruvbox_invert_selection=0
- let g:gruvbox_italic = '1'
- let g:gruvbox_contrast_dark = 'medium'
- let g:gruvbox_contrast_light = 'soft'
- colorscheme gruvbox
- "lightline
- let g:lightline = {
- \ 'colorscheme': 'gruvbox',
- \ }
- """"""""""""""""""""""""""""""""""""""""""""""""""""
- """"""""""NVIM""""""""""""""""""""""""""""""""""""""
- set clipboard=unnamedplus
- "--Mapping--
- tnoremap jk <C-\><C-n>
- "--Terminal
- " map <leader>t :vsplit term://fish<CR>
- " map <leader>y :split term://fish<CR>
- map <C-t> :terminal<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement