From 394409a4cf98868549fd4f3072d80d15de54b5de Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 5 Feb 2018 15:46:43 +0100 Subject: [PATCH] Add powerline font to Xresources, add vim lightline + bufferline, clean vimrc --- .config/xorg/Xresources | 4 +- README.md | 1 + etc/vimrc | 71 ++++++++++++++++++++++++++------ usr/share/vim/vimfiles/pack/list | 2 + 4 files changed, 63 insertions(+), 15 deletions(-) diff --git a/.config/xorg/Xresources b/.config/xorg/Xresources index b32f9a8..0bf3873 100644 --- a/.config/xorg/Xresources +++ b/.config/xorg/Xresources @@ -49,8 +49,8 @@ Xft.antialias: 1 Xft.rgba: rgb ! Terminal config -URxvt*font: xft:DejaVu Sans Mono:size=9:antialias=true -URxvt*boltfont: xft:DejaVu Sans Mono:bold:size=9:antialias=true +URxvt*font: xft:DejaVu Sans Mono for Powerline:size=9 +URxvt*boltfont: xft:DejaVu Sans Mono:bold:size=9 URxvt*letterSpace: -1 URxvt*scrollBar: false URxvt*saveLines: 2000 diff --git a/README.md b/README.md index 13487e0..5a28ae5 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ All packages that are manually installed via pacman -S, dependencies not include zsh-completions libx264 ttf-dejavu + ttf-dejavu-sans-mono-powerline-git (AUR) firefox libnotify pulseaudio diff --git a/etc/vimrc b/etc/vimrc index cf8ab90..d1bb13e 100644 --- a/etc/vimrc +++ b/etc/vimrc @@ -2,33 +2,78 @@ set nobackup set nocompatible +" Setup paths +set viminfo+=n~/.cache/vim_history + "" General filetype plugin on +" Behavior +set clipboard=unnamedplus +set encoding=utf-8 +set fileencoding=utf-8 +set hidden + +set history=1000 +set undolevels=1000 + +set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.png,.jpg +set wildignore=*.bak,*.swp,*.o,*.info,*.aux,*.log,*.dvi,*.bbl,*.blg,*.brf,*.cb,*.ind,*.idx,*.ilg,*.inx,*.out,*.toc,*.png,*.jpg + +" Editing +set number +set ruler + +set background=dark +colorscheme hybrid_reverse + +set cursorline +autocmd! ColorScheme * hi clear CursorLine + " Indentation set autoindent filetype indent on set backspace=indent,eol,start +set shiftround set tabstop=4 set softtabstop=4 set shiftwidth=4 -set expandtab -" Now we set some defaults for the editor -set history=1000 " keep 50 lines of command line history -set ruler " show the cursor position all the time +" UI +set laststatus=2 +set noshowmode +set nowrap -" Suffixes that get lower priority when doing tab completion for filenames. -" These are files we are not likely to want to edit or read. -set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.png,.jpg +" Plugins +let g:lightline = {} +let g:lightline.colorscheme = 'Tomorrow_Night_Bright' +let g:lightline.separator = {'left': "\ue0b0", 'right': "\ue0b2"} +let g:lightline.subseparator = {'left': "\ue0b1", 'right': "\ue0b3"} -" Default clipboard register "+ (CLIPBOARD buffer in X) -set clipboard=unnamedplus +let g:lightline.tabline = {'left': [['buffers']], 'right': [['close']]} +let g:lightline.component_expand = {'buffers': 'lightline#bufferline#buffers'} +let g:lightline.component_type = {'buffers': 'tabsel'} -set background=dark -colorscheme hybrid_reverse +let g:lightline#bufferline#min_buffer_count = 2 + +"" Autocommands + +" Remove trailing whitespace in the following filetypes +autocmd FileType c,cpp,ino,java,py,php,sh,tex autocmd BufWritePre %s/\s\+$//e + +"" Keybindings + +" Tab/Shift+Tab functionality +nnoremap >>_ +nnoremap <<_ +inoremap +vnoremap >gv +vnoremap :bprevious +nnoremap :bnext +nmap 1 lightline#bufferline#go(1) -" Autoremove trailing whitespace in the following filetypes -autocmd FileType c,cpp,ino,sh,java,php autocmd BufWritePre %s/\s\+$//e diff --git a/usr/share/vim/vimfiles/pack/list b/usr/share/vim/vimfiles/pack/list index 40f42a3..98ad2ce 100644 --- a/usr/share/vim/vimfiles/pack/list +++ b/usr/share/vim/vimfiles/pack/list @@ -1,3 +1,5 @@ start: +https://github.com/itchyny/lightline.vim.git +https://github.com/mgee/lightline-bufferline.git opt: https://github.com/kristijanhusak/vim-hybrid-material.git