From b1bd63b4d093bc93880d9267da11257af8257e73 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Fri, 27 Feb 2015 11:07:20 +0100 Subject: Fixed modelineappend function and changed leader key --- vimrc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index be45510..879d50e 100644 --- a/vimrc +++ b/vimrc @@ -1,5 +1,7 @@ execute pathogen#infect() +let mapleader=";" + syntax on filetype plugin indent on @@ -16,14 +18,10 @@ autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif -" Append modeline after last line in buffer. -" Use substitute() instead of printf() to handle '%%s' modeline in LaTeX -" files. function! AppendModeline() - let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d %set :", - \ &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no') - let l:modeline = substitute(&commentstring, "%s", l:modeline, - "") -call append(line("$"), l:modeline) + let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d %set :", + \ &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no') + let l:modeline = substitute(&commentstring, "%s", l:modeline, "") + call append(line("$"), l:modeline) endfunction nnoremap ml :call AppendModeline() -- cgit v1.2.3