VIM Setup Updates
* Leader remmaped to , * Added Limelight for line highlights * Change autocomplete to completor * Added shortcuts for goyo and limelight * Updated VIM section of Readme.md * Autocomplete now behave accordingly (use tab instead of arrows)
This commit is contained in:
parent
4f8106f047
commit
260df4a8d7
70
.vimrc
70
.vimrc
@ -2,17 +2,24 @@
|
|||||||
"
|
"
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
|
" Essentials
|
||||||
Plug 'tpope/vim-sensible' " Sensible defaults
|
Plug 'tpope/vim-sensible' " Sensible defaults
|
||||||
Plug 'drewtempelmeyer/palenight.vim'
|
|
||||||
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
|
||||||
Plug 'junegunn/fzf.vim'
|
|
||||||
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
|
||||||
Plug 'neoclide/coc.nvim', {'branch': 'release'} " Intelisense
|
|
||||||
Plug 'sheerun/vim-polyglot'
|
|
||||||
Plug 'lifepillar/vim-gruvbox8'
|
|
||||||
Plug 'junegunn/vim-easy-align'
|
Plug 'junegunn/vim-easy-align'
|
||||||
|
Plug 'junegunn/fzf.vim'
|
||||||
|
Plug 'junegunn/goyo.vim'
|
||||||
|
Plug 'junegunn/limelight.vim'
|
||||||
|
|
||||||
|
" Auto Completes
|
||||||
|
" Plug 'neoclide/coc.nvim',
|
||||||
|
" Plug 'sheerun/vim-polyglot'
|
||||||
|
Plug 'maralla/completor.vim'
|
||||||
|
|
||||||
|
" Color Schemes
|
||||||
Plug 'rakr/vim-two-firewatch'
|
Plug 'rakr/vim-two-firewatch'
|
||||||
|
Plug 'lifepillar/vim-gruvbox8'
|
||||||
|
Plug 'drewtempelmeyer/palenight.vim'
|
||||||
|
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
@ -24,16 +31,13 @@ set nocompatible
|
|||||||
set number " Show numbers on the left
|
set number " Show numbers on the left
|
||||||
set hlsearch " Highlight search results
|
set hlsearch " Highlight search results
|
||||||
set ignorecase " Search ingnoring case
|
set ignorecase " Search ingnoring case
|
||||||
set smartcase " Do not ignore case if the search patter has uppercase
|
set smartcase " Do not ignore case if the search patter has uppercase set noerrorbells " I hate bells set belloff=esc
|
||||||
set noerrorbells " I hate bells
|
|
||||||
set belloff=esc
|
|
||||||
set tabstop=4 " Tab size of 4 spaces
|
set tabstop=4 " Tab size of 4 spaces
|
||||||
set softtabstop=4 " On insert use 4 spaces for tab
|
set softtabstop=4 " On insert use 4 spaces for tab
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set expandtab " Use apropiate number of spaces
|
set expandtab " Use apropiate number of spaces
|
||||||
set nowrap " Wrapping sucks (except on markdown)
|
set nowrap " Wrapping sucks (except on markdown)
|
||||||
autocmd BufRead,BufNewFile *.md,*.txt setlocal wrap " DO wrap on markdown files
|
autocmd BufRead,BufNewFile *.md,*.txt setlocal wrap " DO wrap on markdown files set noswapfile " Do not leve any backup files
|
||||||
set noswapfile " Do not leve any backup files
|
|
||||||
set mouse=a " Enable mouse on all modes
|
set mouse=a " Enable mouse on all modes
|
||||||
set clipboard=unnamed,unnamedplus " Use the OS clipboard
|
set clipboard=unnamed,unnamedplus " Use the OS clipboard
|
||||||
set showmatch
|
set showmatch
|
||||||
@ -59,7 +63,7 @@ augroup vimrc-remember-cursor-position
|
|||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
set background=dark
|
set background=dark
|
||||||
colo two-firewatch
|
colo gruvbox8_hard
|
||||||
|
|
||||||
map <C-k><C-k> :NERDTreeToggle<cr> " Use Ctrl-P to open the fuzzy file opener
|
map <C-k><C-k> :NERDTreeToggle<cr> " Use Ctrl-P to open the fuzzy file opener
|
||||||
nnoremap <C-p> :Files<cr>
|
nnoremap <C-p> :Files<cr>
|
||||||
@ -70,3 +74,43 @@ xmap ga <Plug>(EasyAlign)
|
|||||||
|
|
||||||
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
|
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
|
||||||
nmap ga <Plug>(EasyAlign)
|
nmap ga <Plug>(EasyAlign)
|
||||||
|
|
||||||
|
" Lightlime Setup
|
||||||
|
" Lighlime Shortcut
|
||||||
|
nmap <Leader>l :Limelight!!<cr>
|
||||||
|
|
||||||
|
" Color name (:help cterm-colors) or ANSI code
|
||||||
|
let g:limelight_conceal_ctermfg = 'gray'
|
||||||
|
let g:limelight_conceal_ctermfg = 240
|
||||||
|
|
||||||
|
" Color name (:help gui-colors) or RGB color
|
||||||
|
let g:limelight_conceal_guifg = 'DarkGray'
|
||||||
|
let g:limelight_conceal_guifg = '#777777'
|
||||||
|
|
||||||
|
" Default: 0.5
|
||||||
|
let g:limelight_default_coefficient = 0.7
|
||||||
|
|
||||||
|
" Number of preceding/following paragraphs to include (default: 0)
|
||||||
|
" let g:limelight_paragraph_span = 1
|
||||||
|
|
||||||
|
" Beginning/end of paragraph
|
||||||
|
" When there's no empty line between the paragraphs
|
||||||
|
" and each paragraph starts with indentation
|
||||||
|
" let g:limelight_bop = '^\s'
|
||||||
|
" let g:limelight_eop = '\ze\n^\s'
|
||||||
|
|
||||||
|
" Highlighting priority (default: 10)
|
||||||
|
" Set it to -1 not to overrule hlsearch
|
||||||
|
let g:limelight_priority = -1
|
||||||
|
|
||||||
|
"Completor Tab
|
||||||
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||||
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||||
|
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
|
||||||
|
|
||||||
|
"Goyo Setup
|
||||||
|
"Call Limelight every time enter Goyo
|
||||||
|
autocmd! User GoyoEnter Limelight
|
||||||
|
autocmd! User GoyoLeave Limelight!
|
||||||
|
" Toggle Goyo
|
||||||
|
nmap <F8> : Goyo<cr>
|
||||||
|
30
README.md
30
README.md
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## General Info
|
## General Info
|
||||||
|
|
||||||
This is the essential vim and tmux configuration for cli based unix systems.
|
This is the essential VIM and Tmux configuration for cli based unix systems.
|
||||||
|
|
||||||
## Clone
|
## Clone
|
||||||
```
|
```
|
||||||
@ -14,6 +14,34 @@ This is the essential vim and tmux configuration for cli based unix systems.
|
|||||||
```
|
```
|
||||||
$ ./install.sh
|
$ ./install.sh
|
||||||
```
|
```
|
||||||
|
## VIM
|
||||||
|
|
||||||
|
### Global
|
||||||
|
|
||||||
|
- Leader remmaped to `,`
|
||||||
|
- Enabled more visual blocks with J and K
|
||||||
|
- Auto tabbed lines from normal mode using `>`
|
||||||
|
|
||||||
|
### NerdTree
|
||||||
|
|
||||||
|
Toggle NerdTree with <CTRL-k><k>.
|
||||||
|
|
||||||
|
### EasyAlign
|
||||||
|
|
||||||
|
Perform multiline visual select then enter `ga`. Next enter your preference alignment.
|
||||||
|
|
||||||
|
### Goyo
|
||||||
|
|
||||||
|
Toggle Goyo from command input mode `:Goyo` or use the <F8> shortcut.
|
||||||
|
|
||||||
|
### Limelight
|
||||||
|
|
||||||
|
Toggle Limelight from command input mode `:Limelight` or use the <Leader><l> shortcut.
|
||||||
|
|
||||||
|
### Completor
|
||||||
|
|
||||||
|
For autocomplete I choose completor. Jut type as usual and the completor will offer some completion, use tab to choose.
|
||||||
|
|
||||||
|
|
||||||
## Future Improvement
|
## Future Improvement
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user