summaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc10
1 files changed, 9 insertions, 1 deletions
diff --git a/.vimrc b/.vimrc
index 21c677c..25e7d69 100644
--- a/.vimrc
+++ b/.vimrc
@@ -45,7 +45,15 @@
" Show tabs as a | with three spaces
" DO NOT remove the trailing space in the next line!
- set listchars=tab:│\
+ set listchars=tab:│\ ,extends:>,precedes:<
+
+ autocmd BufReadPre,FileReadPre * call NoWrapOnLong()
+ function! NoWrapOnLong()
+ let maxline = system("wc -L " . bufname("%") . " | awk '{print $1}'")
+ if maxline > 840
+ set nowrap
+ endif
+ endfunction
" }}}
" Backspace and cursor {{{