From 763e4c423b95dcf92230bfb6358c81d6e7cf9448 Mon Sep 17 00:00:00 2001 From: Laurent Ghigonis Date: Thu, 28 Mar 2013 02:52:25 +0100 Subject: conf: add vimrc and "make deploy" does not fail anymore on ln(1) error --- conf/Makefile | 3 +- conf/vimrc | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 conf/vimrc (limited to 'conf') diff --git a/conf/Makefile b/conf/Makefile index 8dfeb4d..a3db36f 100644 --- a/conf/Makefile +++ b/conf/Makefile @@ -1,2 +1,3 @@ deploy: - ln -s `readlink -f bashrc-laurent-public` ~/.bashrc-laurent-public + -ln -s `readlink -f bashrc-laurent-public` ~/.bashrc-laurent-public + -ln -s `readlink -f vimrc` ~/.vimrc diff --git a/conf/vimrc b/conf/vimrc new file mode 100644 index 0000000..a95c2c9 --- /dev/null +++ b/conf/vimrc @@ -0,0 +1,196 @@ +" Ressources +" http://nvie.com/posts/how-i-boosted-my-vim/ + +" +" general setup +" + +filetype off +set nocompatible +" Use pathogen to easily modify the runtime path to include all +" plugins under the ~/.vim/bundle directory +"call pathogen#helptags() +"call pathogen#runtime_append_all_bundles() +filetype plugin indent on + +set modelines=0 + +let mapleader="," + +nmap ve :e $MYVIMRC +nmap vr :so $MYVIMRC + +" +" behavior +" + +" wrapping +set wrap +set textwidth=79 +set formatoptions=qrn1 +set colorcolumn=81 + +"set hidden + +"set tabstop=2 +"set shiftwidth=2 +"set smarttab +"set softtabstop=2 +" +set tabstop=2 " a tab is four spaces +set expandtab +set backspace=indent,eol,start " allow backspacing over everything in insert mode +set autoindent " always set autoindenting on +set copyindent " copy the previous indentation on autoindenting +" set number " always show line numbers +set shiftwidth=2 " number of spaces to use for autoindenting +set shiftround " use multiple of shiftwidth when indenting with '<' and '>' +set showmatch " set show matching parenthesis +set ignorecase " ignore case when searching +set smartcase " ignore case if search pattern is all lowercase, case-sensitive otherwise +set smarttab " insert tabs on the start of a line according to shiftwidth, not tabstop +set hlsearch " highlight search terms +set incsearch " show search matches as you type + +set history=1000 " remember more commands and search history +set undolevels=1000 " use many muchos levels of undo +set wildignore=*.swp,*.bak,*.pyc,*.class +set title " change the terminal's title +set visualbell " don't beep +set noerrorbells " don't beep + +set nobackup +" set noswapfile + +" +" file type +" + +filetype plugin indent on +if has('autocmd') + autocmd filetype python set expandtab +endif + +" +" color +" + +if &t_Co >= 256 || has("gui_running") + colorscheme mustang +endif + +if &t_Co > 2 || has("gui_running") + " switch syntax highlighting on, when the terminal has colors + syntax on +endif + +" +" editing +" + +"set list +" set listchars=tab:>.,trail:.,extends:#,nbsp:. +" set listchars=trail:.,extends:#,nbsp:. +" set listchars-=tab:>. +"autocmd filetype html,xml set listchars-=tab:>. + +" +" paste +" + +set pastetoggle= +map "+p +vmap "+yi +vmap "+c +vmap c"+p +imap "+p +"nmap :!read xsel --clipboard --output + +" +" mouse +" + +"set mouse=a +"XXX install vim x11 +"set ttymouse=xterm2 "to work inside tmux +"noremap :call ToggleMouse() +"inoremap :call ToggleMouse()a + +" +" bindings +" + +nnoremap ; : +inoremap +nnoremap +vnoremap + +" Use Q for formatting the current paragraph (or selection) +vmap Q gq +nmap Q gqap + +" Jump to next line in editor, not in file +nnoremap j gj +nnoremap k gk + +" Easy window navigation +map h +map j +map k +map l + +" Clear search +nmap ,/ :nohlsearch + +" Reopen file with sudo +cmap w!! w !sudo tee % >/dev/null + +" Search with ack +nnoremap a :Ack + +nnoremap P :ToggleRaibowParenthesis + +" +" Plugins +" + +" * Command-t - ,t +" * snipMate - for + +" +" Autosave on focus out +" +au FocusLost * :wa + +" ---- +" MINE +" ---- + +" set hlsearch +set guifont="Monospace 9" + +" warren +"set tabstop=4 +"set shiftwidth=4 +"set smarttab +"set expandtab +"set softtabstop=4 +"set autoindent +"im : : + +" p1 +"set tabstop=2 +"set shiftwidth=2 +"set smarttab +"set expandtab +"set softtabstop=2 +"set autoindent +"im : : + +" filetype plugin indent on + +imap =============================================================================== +nmap a=============================================================================== +imap ================================================================================strftime("%Y%m%d-%H%M") +nmap a================================================================================strftime("%Y%m%d-%H%M") + -- cgit v1.2.3-59-g8ed1b