|  | @@ -52,9 +52,6 @@ set foldmethod=indent
 | 
	
		
			
				|  |  |  " foldlevel when window is loaded
 | 
	
		
			
				|  |  |  set foldlevelstart=1
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -" space is Leader
 | 
	
		
			
				|  |  | -map <space> <leader>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  " fold based on indent level
 | 
	
		
			
				|  |  |  set foldmethod=indent
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -83,59 +80,12 @@ if !(has("win32") || has("win16") || has("win32unix"))
 | 
	
		
			
				|  |  |      endif
 | 
	
		
			
				|  |  |  endif
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -"caps switching functions - unused
 | 
	
		
			
				|  |  | -"" function to check for running instances of vim on Linux
 | 
	
		
			
				|  |  | -"function! UnixCapsControl()
 | 
	
		
			
				|  |  | -"    silent! let running = system('echo $(pgrep -c vim)')
 | 
	
		
			
				|  |  | -"    if(running <= 1)
 | 
	
		
			
				|  |  | -"        silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Caps_Lock'
 | 
	
		
			
				|  |  | -"    endif
 | 
	
		
			
				|  |  | -"endfunction
 | 
	
		
			
				|  |  | -"
 | 
	
		
			
				|  |  | -"" map caps lock to escape under Linux
 | 
	
		
			
				|  |  | -"!(has("win32") || has("win16") || has("win32unix")) && (!$SSH_CLIENT && !$SSH_TTY) && executable("xmodmap")
 | 
	
		
			
				|  |  | -"
 | 
	
		
			
				|  |  | -"    au VimEnter * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
 | 
	
		
			
				|  |  | -"    au VimLeave * :call UnixCapsControl()
 | 
	
		
			
				|  |  | -"endif
 | 
	
		
			
				|  |  | -"
 | 
	
		
			
				|  |  | -"" function to check for running instances of vim on Windows
 | 
	
		
			
				|  |  | -"function! WindowsCapsControl()
 | 
	
		
			
				|  |  | -"    silent! let running = system('tasklist /FI "IMAGENAME eq vim.exe" 2>NUL | find /I /C "vim.exe"')
 | 
	
		
			
				|  |  | -"    if(running <= 1)
 | 
	
		
			
				|  |  | -"        silent! !start taskkill /IM CapsEsc.exe
 | 
	
		
			
				|  |  | -"    endif
 | 
	
		
			
				|  |  | -"endfunction
 | 
	
		
			
				|  |  | -"
 | 
	
		
			
				|  |  | -"" map caps lock to escape under Windows
 | 
	
		
			
				|  |  | -"if (has("win32") || has("win16"))
 | 
	
		
			
				|  |  | -"    au VimEnter * silent! !start C:\Users\Josh\vimfiles\CapsEsc.exe
 | 
	
		
			
				|  |  | -"    au VimLeave * :call WindowsCapsControl()
 | 
	
		
			
				|  |  | -"endif
 | 
	
		
			
				|  |  | -""
 | 
	
		
			
				|  |  | -"" function to check for running instances of vim on Cygwin
 | 
	
		
			
				|  |  | -"function! CygwinCapsControl()
 | 
	
		
			
				|  |  | -"    silent! let running = system('echo $(pgrep -c vim)')
 | 
	
		
			
				|  |  | -"    if(running <= 1)
 | 
	
		
			
				|  |  | -"        silent! !pkill CapsEsc
 | 
	
		
			
				|  |  | -"    endif
 | 
	
		
			
				|  |  | -"endfunction
 | 
	
		
			
				|  |  | -"
 | 
	
		
			
				|  |  | -"" map caps lock to escape under Cygwin
 | 
	
		
			
				|  |  | -"if (has("win32unix"))
 | 
	
		
			
				|  |  | -"    au VimEnter * silent! !/home/josh/.vim/CapsEsc.exe &
 | 
	
		
			
				|  |  | -"    au VimLeave * :call CygwinCapsControl()
 | 
	
		
			
				|  |  | -"endif
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  " swap files are rotated every 10 keystrokes
 | 
	
		
			
				|  |  |  set updatecount=10
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  " backspace is used to remove previous characters, indents, and newlines
 | 
	
		
			
				|  |  |  set backspace=indent,eol,start
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -" <Leader>l formats a line
 | 
	
		
			
				|  |  | -noremap <Leader>l Vgq
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  " make an undo file to allow undoing after closing a file
 | 
	
		
			
				|  |  |  set undofile
 | 
	
		
			
				|  |  |  set undodir=~/.vim/undodir
 | 
	
	
		
			
				|  | @@ -153,17 +103,11 @@ function! s:DiffWithSaved()
 | 
	
		
			
				|  |  |  endfunction
 | 
	
		
			
				|  |  |  com! DiffSaved call s:DiffWithSaved()
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -" map the comp buff function above
 | 
	
		
			
				|  |  | -noremap <Leader>d :DiffSaved<CR>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -" map the write and make function
 | 
	
		
			
				|  |  | -noremap <Leader>c :WriteMake<CR>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  " write w/ privileges when Vim isn't started as root
 | 
	
		
			
				|  |  |  cmap w!! %!sudo tee > /dev/null %
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -" remove trailing whitespace and return to start position
 | 
	
		
			
				|  |  | -noremap <Leader>w :%s/\s\+$//<CR>``
 | 
	
		
			
				|  |  | +" ignore modelines
 | 
	
		
			
				|  |  | +set modelines=0
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  " toggle background
 | 
	
		
			
				|  |  |  function! ClearBG()
 | 
	
	
		
			
				|  | @@ -174,14 +118,29 @@ function! BlackBG()
 | 
	
		
			
				|  |  |    highlight Nornal ctermbg=black
 | 
	
		
			
				|  |  |  endfunction
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +" ensure normal tabs and 8 space tabs in assembly files
 | 
	
		
			
				|  |  | +autocmd FileType asm set noexpandtab shiftwidth=8 softtabstop=0
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +" space is Leader
 | 
	
		
			
				|  |  | +map <space> <leader>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +" <Leader>l formats a line
 | 
	
		
			
				|  |  | +noremap <Leader>l Vgq
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +" map the comp buff function above
 | 
	
		
			
				|  |  | +noremap <Leader>d :DiffSaved<CR>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +" map the write and make function
 | 
	
		
			
				|  |  | +noremap <Leader>c :WriteMake<CR>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +" remove trailing whitespace and return to start position
 | 
	
		
			
				|  |  | +noremap <Leader>w :%s/\s\+$//<CR>``
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  " plugins
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  " show recently opened files
 | 
	
		
			
				|  |  |  noremap <Leader>m :MRU<CR>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -" Start Geeknote
 | 
	
		
			
				|  |  | -noremap <Leader>g :Geeknote<CR>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  " show undo tree
 | 
	
		
			
				|  |  |  noremap <Leader>u :UndotreeToggle<CR>
 | 
	
		
			
				|  |  |  
 |