Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set nocompatible
- set encoding=utf-8
- set guifont=Iosevka:h9
- if empty(glob('~/.vim/autoload/plug.vim'))
- silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
- \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
- endif
- call plug#begin('~/.vim/bundle')
- " Interface
- Plug 'itchyny/lightline.vim'
- Plug 'airblade/vim-gitgutter'
- Plug 'bling/vim-bufferline'
- " Utility
- Plug 'w0rp/ale'
- Plug 'tpope/vim-fugitive'
- Plug 'lilydjwg/colorizer', { 'on': 'ColorHighlight' }
- Plug '/usr/local/opt/fzf'
- Plug 'junegunn/fzf.vim'
- Plug 'plasticboy/vim-markdown', {'for': 'markdown'}
- Plug 'junegunn/goyo.vim', {'for': 'markdown' }
- Plug 'iamcco/markdown-preview.vim', { 'for': 'markdown' }
- call plug#end()
- " Basic Config.
- set backspace=indent,eol,start " Backspace like normal
- set hidden " Hide buffer (file) instead of abandoning when switching to another buffer
- set wildmenu " Command-line autocompletion
- set showmatch " Highlight ([{}])
- set lazyredraw
- set mouse=n
- filetype on
- filetype plugin on
- filetype indent on
- set smartindent
- " 4 spaces tabs
- set shiftwidth=4
- set tabstop=4
- set expandtab
- set smarttab
- " Search
- set ignorecase " Ignore case wgeb searching
- set smartcase " If there is an uppercase in your search term search case sensitive again
- set incsearch " Highlight search when results typing
- set hlsearch " Highlight search results
- " Beep
- set noerrorbells
- " UI
- set number relativenumber " Display line numbers
- set cursorline
- set nowrap " Wrap lines when they are too long
- set noshowmode " Hide --MODE--
- set scrolloff=5 " Display at least 5 lines around your cursor (for scrolling)
- set guioptions=
- if has('termguicolors')
- let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
- let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
- set termguicolors
- endif
- colorscheme base16-material-palenight
- set background=dark
- " Mappings
- map <up> <nop>
- map <down> <nop>
- map <left> <nop>
- map <right> <nop>
- nnoremap j gj
- nnoremap k gk
- let mapleader=' '
- nnoremap <leader>f :Files<CR>
- nnoremap <leader>l :Lines<CR>
- nnoremap <leader>a :Rg<CR>
- nnoremap <leader>b :Buffers<CR>
- nnoremap <leader>g :Goyo<CR>
- " Lightline
- set laststatus=2
- set showtabline=2
- let g:lightline = {
- \ 'colorscheme': 'material_palenight',
- \ 'active': {
- \ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'filename', 'modified' ] ]
- \ },
- \ 'tabline': {
- \ 'left': [ [ 'bufferline' ] ],
- \ 'right':[ [ 'gitbranch' ] ]
- \ },
- \ 'component': {
- \ 'lineinfo': '%3l:%-2v'
- \ },
- \ 'component_function': {
- \ 'gitbranch': 'Lightline_GitBranch'
- \ },
- \ 'component_expand': {
- \ 'bufferline': 'Lightline_Bufferline',
- \ },
- \ 'component_type': {
- \ 'bufferline': 'tabsel',
- \ },
- \ 'mode_map': {
- \ 'n': 'N', 'i': 'I', 'R': 'R', 'v': 'V', 'V': 'VL', "\<C-v>": 'VB',
- \ 'c': 'COMMAND', 's': 'SELECT', 'S': 'S-LINE', "\<C-s>": 'S-BLOCK', 't': 'TERMINAL'
- \ },
- \ 'separator': { 'left': '', 'right': '' },
- \ 'subseparator': { 'left': '|', 'right': '|' },
- \ 'enable': { 'statusline':1, 'tabline':1 },
- \}
- function! Lightline_GitBranch()
- if exists('fugitive#head')
- let branch = fugitive#head()
- return branch !=# '' ? ' '.branch : ''
- endif
- return 'Buffers'
- endfunction
- function! Lightline_Bufferline()
- call bufferline#refresh_status()
- return [ g:bufferline_status_info.before, g:bufferline_status_info.current, g:bufferline_status_info.after]
- endfunction
- " Bufferline
- let g:bufferline_echo = 0
- let g:bufferline_active_buffer_left = ''
- let g:bufferline_active_buffer_right = ''
- let g:bufferline_modified = ' +'
- " Markdown
- autocmd User GoyoEnter set wrap linebreak nolist
- let g:goyo_width = "85%"
- let g:goyo_height = '90%'
- set conceallevel=2
- " FZF
- let g:fzf_colors =
- \ { 'fg': ['fg', 'Normal'],
- \ 'bg': ['bg', 'Normal'],
- \ 'hl': ['fg', 'Comment'],
- \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
- \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
- \ 'hl+': ['fg', 'Statement'],
- \ 'info': ['fg', 'PreProc'],
- \ 'border': ['fg', 'Ignore'],
- \ 'prompt': ['fg', 'Conditional'],
- \ 'pointer': ['fg', 'Exception'],
- \ 'marker': ['fg', 'Keyword'],
- \ 'spinner': ['fg', 'Label'],
- \ 'header': ['fg', 'Comment'] }
- let g:is_transparent = 0
- function! Toggle_transparent()
- if g:is_transparent == 0
- hi Normal guibg=NONE
- hi LineNr guifg=#676E95 guibg=NONE
- let g:is_transparent = 1
- else
- set background=dark
- let g:is_transparent = 0
- endif
- endfunction
- nnoremap <C-t> :call Toggle_transparent()<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement