]> git.phdru.name Git - dotfiles.git/blobdiff - .vimrc
.fvwmrc: Change big terminal size
[dotfiles.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index 8e8884172805f4014f01f25446dc241e559543b5..7bb96e27e7398e5b2ebf9ac7c63e4b2b12331c42 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -386,13 +386,13 @@ autocmd BufReadPost * call RestorePosition()
 
 
 function! SetupEncoding(encoding)
-   if !has("iconv") || exists('b:encoding_set') || strlen(a:encoding) == 0
+   if !has("iconv") || exists('b:encoding_set') || empty(a:encoding)
       return
    endif
 
    call RestorePosition()
    let b:encoding_set = 1
-   if len(expand('%'))
+   if !empty(expand('%'))
       execute "edit ++enc=" . a:encoding
    endif
 endfunction
@@ -458,7 +458,7 @@ function! ExtractURL()
    let line = getline('.')
    let parts = split(line, s:URL_re . '\zs')
 
-   if len(parts) == 0
+   if empty(parts)
       throw 'ExtractURLCannotFindURL' " No URL found
    endif
 
@@ -713,8 +713,6 @@ command! Text call Text()
 function! AutoEncoding()
   if &modified && &fileencoding != ""
     call SetupEncoding(&fileencoding)
-  else
-    redraw
   endif
   autocmd! auto-encoding
   augroup! auto-encoding
@@ -781,7 +779,7 @@ if has("spell")
    autocmd BufReadPost * call SetupSpell()
 
    function! SaveSpell()
-      if expand('%') == expand('~/.vim/spell/en.ascii.add')
+      if expand('%:p') == expand('~/.vim/spell/en.ascii.add')
          mkspell! -ascii %
       else
          mkspell! %