]> git.mdlowis.com Git - archive/vim_config.git/commitdiff
Updated to support nvim and updated the status line tab indicator to a simpler implem...
authorMike D. Lowis <mike.lowis@gentex.com>
Wed, 14 Oct 2015 20:45:13 +0000 (16:45 -0400)
committerMike D. Lowis <mike.lowis@gentex.com>
Wed, 14 Oct 2015 20:45:13 +0000 (16:45 -0400)
nvimrc [new symlink]
spell/en.utf-8.spl [new file with mode: 0644]
vimrc

diff --git a/nvimrc b/nvimrc
new file mode 120000 (symlink)
index 0000000..6f19044
--- /dev/null
+++ b/nvimrc
@@ -0,0 +1 @@
+/home/mdlowis/.vim/vimrc
\ No newline at end of file
diff --git a/spell/en.utf-8.spl b/spell/en.utf-8.spl
new file mode 100644 (file)
index 0000000..a41bf79
Binary files /dev/null and b/spell/en.utf-8.spl differ
diff --git a/vimrc b/vimrc
index d9ade8f424a03f1d1f033c3aca63f8df1f45a5a4..e93e7bfc23ab666502c6296c1ba47b6d1d754630 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -2,10 +2,12 @@
 " General Settings
 "==============================================================================
 let $VIMHOME=expand("<sfile>:p:h")   " Keep track of where our vim settings directory is
+set background=dark                  " Set background style to dark for colorschemes
 syntax enable                        " Turn on syntax highlighting
 filetype plugin on                   " Turn on filetype plugins
 filetype indent on                   " Turn off filetype indent to use custom indent settings
-colorscheme cake                     " Set default color scheme
+let g:solarized_termtrans=1
+colorscheme solarized                " Set default color scheme
 set nocompatible                     " Disable VI compatibility
 set backspace=indent,eol,start       " Makes backspace work as expected
 set whichwrap+=<,>,[,],h,l           " Make cursor keys wrap line
@@ -58,19 +60,6 @@ set title
 "==============================================================================
 let g:TodoList    = "~/.todo.md"
 let g:TemplateDir = $VIMHOME . "/templates" " Directory to search for templates
-let g:BufsLeft    = "" " Buffers to the left of our current buffer
-let g:CurBuffer   = "" " Name of our current buffer
-let g:BufsRight   = "" " Buffers to the right of the current buffer
-
-"==============================================================================
-" Function and Command Definitions
-"==============================================================================
-set statusline=%{g:BufsLeft}
-set statusline+=%#CurBuf#
-set statusline+=%{g:CurBuffer}
-set statusline+=%#SyntaxLine#
-set statusline+=%{g:BufsRight}
-set statusline+=%<%=[%l][%c][%P][%L]%<
 
 "==============================================================================
 " Function and Command Definitions
@@ -124,26 +113,26 @@ function! Template(input)
     endif
 endfunction
 
-" UpdateStatus - Updates the status bar to display a list of buffers
+"  UpdateStatus - Updates the status bar to display a list of buffers
 function! UpdateStatus(lmarg,rmarg)
     " Reset our Globals
-    let g:CurBuffer = '[' . bufnr('%') . ' ' . expand('%:t') . ((&modified) ? ' +]' : ']')
+    let g:CurBuffer =  bufnr('%') . ' ' . expand('%:t')
     let g:BufsLeft = ""
     let g:BufsRight = ""
 
-    let tot_margin = a:lmarg+ a:rmarg
+    let tot_margin = a:lmarg + a:rmarg
     let my_left_len = (winwidth(0) - len(g:CurBuffer) - tot_margin)
     let my_right_len = 0
     let i = bufnr('$')
 
     while(i > 0)
         if buflisted(i) && getbufvar(i, "&modifiable") && i != bufnr('%')
-            let bufName  =  '[' . i . ' ' . fnamemodify(bufname(i), ":t")
-            let bufName .= (getbufvar(i, "&modified") ? ' +]' : ']' )
+            let bufName  =  i . ' ' . fnamemodify(bufname(i), ":t") " . ' | '
+            let bufName .= (getbufvar(i, "&modified") ? ',+' : '' )
             if i < bufnr('%')
-                let g:BufsLeft = bufName . g:BufsLeft
+                let g:BufsLeft = ' ' . bufName . ' |' . g:BufsLeft
             else
-                let g:BufsRight = bufName . g:BufsRight
+                let g:BufsRight = '| ' . bufName . ' ' . g:BufsRight
             endif
         endif
         let i -= 1
@@ -164,6 +153,13 @@ function! UpdateStatus(lmarg,rmarg)
     if len(g:BufsRight) > my_right_len
         let g:BufsRight = strpart(g:BufsRight, 0, my_right_len) . '>'
     endif
+
+    set statusline=%{g:BufsLeft}
+    set statusline+=%#CurBuf#
+    set statusline+=\ %{g:CurBuffer}%M
+    set statusline+=\ %#SyntaxLine#
+    set statusline+=%{g:BufsRight}
+    set statusline+=%<%=[%l][%c][%P][%L]%<
 endfunction
 
 "==============================================================================
@@ -275,7 +271,7 @@ autocmd BufEnter * call LoadProject()
 autocmd BufWritePre * call ReformatWhiteSpace()
 
 " Update the buffer list in the status line
-autocmd VimEnter,BufNew,BufEnter,BufWritePost,VimResized,FocusLost,FocusGained,InsertLeave * call UpdateStatus(0,20)
+autocmd BufEnter * call UpdateStatus(5,20)
 
 "==============================================================================
 " Doxygen Comment Configuration
@@ -283,14 +279,3 @@ autocmd VimEnter,BufNew,BufEnter,BufWritePost,VimResized,FocusLost,FocusGained,I
 " File author tag
 let g:DoxygenToolkit_authorName = "Michael D. Lowis"
 
-"==============================================================================
-" GVim
-"==============================================================================
-if has('gui_running')
-    set guioptions-=T      " no toolbar
-    set guioptions-=m      " no menubar
-    set guifont=Monaco:h10 " use 10 point Monaco font in gui mode
-
-    " GVim resets this for some stupid reason so disable visual bell ... again
-    autocmd GUIEnter * set visualbell t_vb=
-endif