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 set shell=bash
endif endif
if &compatible
set nocompatible
endif
function! s:smart_source_rc(name) function! s:smart_source_rc(name)
call s:source_rc(a:name . '.rc.vim') call s:source_rc(a:name . '.rc.vim')
call s:source_rc(a:name . '.local.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 " IsGuiApp determines if (n)vim is running in a GUI
function! IsGuiApp() function! IsGuiApp()
return has("gui_running") || exists("neovim_dot_app") return has('gui_running') || exists('neovim_dot_app')
\ || has("gui_win32") || has("gui_macvim") \ || has('gui_win32') || has('gui_macvim')
\ || has("gui_vimr") || exists('g:gui_oni') \ || has('gui_vimr') || exists('g:gui_oni')
endfunction endfunction
" Some GUI applications provide built in support for certain features " 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')) if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall augroup pluginstall
autocmd VimEnter * PlugInstall
augroup end
endif endif
call s:smart_source_rc('init') call s:smart_source_rc('init')

View File

@ -1,13 +1,19 @@
" Both these plugins work well together for distraction free editing " Both these plugins work well together for distraction free editing
command Zen :Goyo
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' } Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' } Plug 'junegunn/limelight.vim', { 'on': 'Limelight' }
let g:goyo_width = 120 let g:goyo_width = 120
command Zen :Goyo
function! s:goyo_enter() function! s:goyo_enter()
Limelight Limelight
endfunction endfunction
function! s:goyo_leave() function! s:goyo_leave()
Limelight! Limelight!
endfunction 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 augroup ftomni
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType python setlocal omnifunc=jedi#completions autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete autocmd FileType python setlocal omnifunc=jedi#completions
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags 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 " Display filename at bottom of window
set ls=2 set laststatus=2
"enable line numbers "enable line numbers
set nu set number
" Highlights the line the cursor is on " Highlights the line the cursor is on
set cursorline set cursorline
@ -11,7 +14,7 @@ set cursorline
syntax on syntax on
" Enable search highlighting " Enable search highlighting
set hls set hlsearch
" Color Schemes {{ " Color Schemes {{
" Set theme based on $VIM_COLOR variable " Set theme based on $VIM_COLOR variable
@ -41,7 +44,7 @@ function! UpdateColors()
let dark_color = $VIM_COLOR_DARK let dark_color = $VIM_COLOR_DARK
endif endif
" Detect using an env variable " 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 " On macOS we can do something a bit more fancy
if IsMac() if IsMac()
let cmd = "osascript let cmd = "osascript
@ -53,7 +56,7 @@ function! UpdateColors()
endif endif
let dark_mode = substitute(system(cmd), '\n', '', 'g') let dark_mode = substitute(system(cmd), '\n', '', 'g')
" Set colorscheme and background based on mode " Set colorscheme and background based on mode
if dark_mode == 'true' if dark_mode ==# 'true'
execute 'colorscheme ' . dark_color execute 'colorscheme ' . dark_color
set background=dark set background=dark
else else
@ -83,10 +86,10 @@ endif
" Set xterm and screen/tmux's title {{ " Set xterm and screen/tmux's title {{
set titlestring=vim\ %{expand(\"%t\")} 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 " pretend this is xterm. it probably is anyway, but if term is left as
" `screen`, vim doesn't understand ctrl-arrow. " `screen`, vim doesn't understand ctrl-arrow.
if &term == "screen-256color" if &term ==# 'screen-256color'
set term=xterm-256color set term=xterm-256color
else else
set term=xterm set term=xterm