Wednesday, July 24, 2019

VIM Setting Example

setup vundle

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim


edit .vimrc

set nocompatible
syntax on
"enable syntax

set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
colorscheme monokai
set visualbell

" enable line Number
set number

"show hiden charactor
set list

" turn relative line numbers on
set rnu
set paste
set cursorline

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/nerdtree'
Plugin 'sickill/vim-monokai'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'Yggdroot/indentLine'

call vundle#end()

set autoindent
set smartindent

filetype plugin indent on


"disable arrows keys

nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>

inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>

" enable AirlineColorscheme bubblegum 
let g:airline_theme='bubblegum'

" Windows move shortcut
map <C-h> :call WinMove('h')<cr>
map <C-j> :call WinMove('j')<cr>
map <C-k> :call WinMove('k')<cr>
map <C-l> :call WinMove('l')<cr>

" Window movement shortcuts
" move to the window in the direction shown, or create a new window
function! WinMove(key)
    let t:curwin = winnr()
    exec "wincmd ".a:key
    if (t:curwin == winnr())
        if (match(a:key,'[jk]'))
            wincmd v
        else
            wincmd s
        endif
        exec "wincmd ".a:key
    endif

endfunction


Install ColorScheme Monokai
mkdir ~/.vim/colors
cd ~/.vim/colors
ln -s ./../bundle/vim-monokai/colors/monokai.vim monokai.vim

:PluginInstall

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

ALCATEL 6900

write memory copy running certified reload from working no rollback-timeout