Skip to content

Commit

Permalink
Reduce .vimrc.settings
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholashoule committed Oct 3, 2022
1 parent 728d5e2 commit 4fccbae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ curl -sSL https://get.rvm.io | bash -s stable --auto-dotfiles

[GitHub - VundleVim](https://github.com/VundleVim/Vundle.vim)

Launch vim and run `:PluginInstall`
```
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
```

To install from command line: `vim +PluginInstall +qall`

Launch vim and run `:PluginInstall`

##### Set up .oh-my-zsh

[GitHub - Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh)
Expand Down
9 changes: 4 additions & 5 deletions home/.vimrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Vundle requirements
" GitHub: https://github.com/VundleVim/Vundle.vim
set nocompatible " be iMproved, required
filetype off " required
set nocompatible " be iMproved, required
filetype off " required

" Set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
Expand All @@ -13,12 +13,11 @@ Plugin 'VundleVim/Vundle.vim'
" GitHub plugins
Plugin 'airblade/vim-gitgutter'
Plugin 'dense-analysis/ale'
Plugin 'hashivim/vim-terraform'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'

" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
call vundle#end() " required
filetype plugin indent on " required

:so ~/.vimrc.settings
18 changes: 9 additions & 9 deletions home/.vimrc.settings
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function! ToggleNumber()
endif
endfunction

" toggle between paste, and nopaste
" Toggle between paste, and nopaste
function! TogglePaste()
if(&paste == 1)
set nopaste nopaste?
Expand All @@ -66,6 +66,7 @@ function! GitStatus()
return printf('+%d ~%d -%d', a, m, r)
endfunction

" LinterStatus(), dense-analysis/ale
function! LinterStatus() abort
let l:counts = ale#statusline#Count(bufnr(''))
let l:all_errors = l:counts.error + l:counts.style_error
Expand Down Expand Up @@ -133,19 +134,15 @@ set encoding=utf-8
" PLUGIN OPTIONS {{{

" Plugin: airblade/vim-gitgutter options
set statusline+=%{GitStatus()}
let g:gitgutter_terminal_reports_focus=0
let g:gitgutter_set_sign_backgrounds = 0
highlight link GitGutterChangeLine DiffText

" Plugin: dense-analysis/ale options
let g:ale_fix_on_save = 0
let g:ale_open_list = 0
let g:ale_floating_window_border = ['│', '─', '╭', '╮', '╯', '╰', '│', '─']
let g:ale_echo_msg_format = '[%severity%] [%linter%] %s '
let g:ale_set_highlights = 0
let g:ale_change_sign_column_color = 0
let g:ale_sign_column_always = 1
let g:ale_sign_error = '🚩'
let g:ale_sign_warning = '🚧'
let g:ale_pattern_options = {'\.min.js$': {'ale_enabled': 0}}
Expand All @@ -161,24 +158,26 @@ let g:ale_linters_ignore = {
\ 'typescript': ['tslint']
\}
let g:ale_fixers = {'javascript': ['eslint'], '*': ['prettier']}
set statusline+=%{LinterStatus()}

" Plugin: vim-airline/vim-airline options
let g:airline_highlighting_cache = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'default'
let g:airline#extensions#ale#enabled = 1

" MOVED TO THEME OPTIONS SECTION
" Plugin: vim-airline/vim-airline-theme options
"let g:airline_theme='luna'
"set statusline+=%{LinterStatus()}
"set statusline+=%{GitStatus()}

"}}}
" THEME OPTIONS {{{

" Set colorscheme, overriden by plugins
"colorscheme solarized
let g:airline_theme='bubblegum'
let g:airline_theme='distinguished'

" }}}
" UI CONFIG {{{
Expand Down Expand Up @@ -302,13 +301,14 @@ nmap <silent> <C-j> <Plug>(ale_next_wrap)
set autoread

" Mapping key press wait timeout
set timeout timeoutlen=1000
set timeout timeoutlen=50
set ttimeoutlen=50

" Hide buffers after they are abandoned
set hidden

" Increase History
set history=100000
set history=10000

" Disable files that don't need to be created
set noswapfile
Expand Down

0 comments on commit 4fccbae

Please sign in to comment.