Pass lint

This commit is contained in:
ViViDboarder 2019-10-24 13:58:45 -07:00
parent 4cf4f83897
commit c16f793fb8
4 changed files with 33 additions and 24 deletions

View File

@ -8,10 +8,6 @@ if &shell =~# 'fish$'
set shell=bash
endif
if &compatible
set nocompatible
endif
function! s:smart_source_rc(name)
call s:source_rc(a:name . '.rc.vim')
call s:source_rc(a:name . '.local.rc.vim')
@ -46,9 +42,9 @@ endfunction
" IsGuiApp determines if (n)vim is running in a GUI
function! IsGuiApp()
return has("gui_running") || exists("neovim_dot_app")
\ || has("gui_win32") || has("gui_macvim")
\ || has("gui_vimr") || exists('g:gui_oni')
return has('gui_running') || exists('neovim_dot_app')
\ || has('gui_win32') || has('gui_macvim')
\ || has('gui_vimr') || exists('g:gui_oni')
endfunction
" Some GUI applications provide built in support for certain features
@ -62,7 +58,9 @@ let g:gui.has_ctags_features = exists('g:gui_oni')
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
augroup pluginstall
autocmd VimEnter * PlugInstall
augroup end
endif
call s:smart_source_rc('init')

View File

@ -1,13 +1,19 @@
" Both these plugins work well together for distraction free editing
command Zen :Goyo
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' }
let g:goyo_width = 120
command Zen :Goyo
function! s:goyo_enter()
Limelight
endfunction
function! s:goyo_leave()
Limelight!
endfunction
autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()
augroup zenevents
autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()
augroup end

View File

@ -1,6 +1,8 @@
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=jedi#completions
autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
augroup ftomni
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=jedi#completions
autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
augroup end

View File

@ -1,7 +1,10 @@
" Add encoding for multibyte chars
scriptencoding utf-8
" Display filename at bottom of window
set ls=2
set laststatus=2
"enable line numbers
set nu
set number
" Highlights the line the cursor is on
set cursorline
@ -11,7 +14,7 @@ set cursorline
syntax on
" Enable search highlighting
set hls
set hlsearch
" Color Schemes {{
" Set theme based on $VIM_COLOR variable
@ -41,7 +44,7 @@ function! UpdateColors()
let dark_color = $VIM_COLOR_DARK
endif
" Detect using an env variable
let cmd = "echo $IS_DARKMODE"
let cmd = 'echo $IS_DARKMODE'
" On macOS we can do something a bit more fancy
if IsMac()
let cmd = "osascript
@ -53,7 +56,7 @@ function! UpdateColors()
endif
let dark_mode = substitute(system(cmd), '\n', '', 'g')
" Set colorscheme and background based on mode
if dark_mode == 'true'
if dark_mode ==# 'true'
execute 'colorscheme ' . dark_color
set background=dark
else
@ -83,10 +86,10 @@ endif
" Set xterm and screen/tmux's title {{
set titlestring=vim\ %{expand(\"%t\")}
if &term =~ "^screen"
if &term =~# '^screen'
" pretend this is xterm. it probably is anyway, but if term is left as
" `screen`, vim doesn't understand ctrl-arrow.
if &term == "screen-256color"
if &term ==# 'screen-256color'
set term=xterm-256color
else
set term=xterm