-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot.vimrc
More file actions
96 lines (88 loc) · 2.7 KB
/
Copy pathdot.vimrc
File metadata and controls
96 lines (88 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
execute pathogen#infect()
colorscheme molokai
set background=dark
if has("syntax")
syntax on
endif
if has("autocmd")
" In text files, always limit the width of text to 80 characters
autocmd BufRead *.txt set textwidth=80
" Same goes for the Markdown files
autocmd BufRead *.md set textwidth=80
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
filetype plugin indent on
endif
" Settings
if &t_Co > 2
set t_Co=256
else
set t_Co=16
endif
"set backup " keep a backup file
set nocompatible " Use Vim defaults (much better!)
set backspace=indent,eol,start "backspacing over everything in insert mode
set viminfo='20,\"50
set history=30 "lines of command line history kept
set ruler "show the cursor position all the time
set laststatus=2 " StatusLine
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
set hlsearch " Hilight during search
"set list
"set lcs:tab:>-,trail:.
set cindent " Good stuff
set smartindent
set autoindent
set softtabstop=4
set tabstop=4
set shiftwidth=4
set expandtab
"set cinkeys=0{,0},:,0#,!,!^F
set pastetoggle=<F11> " Save to type :set paste
set visualbell " Because I'm listening music
set confirm " Ask if unsaved changes while quit
set hidden " Hide buffers when they are abandoned
set wildmenu " Better command-line completion
set wildmode=list:longest
" Mappings
if version >= 700
map <F1> "<Esc>:! perldoc <cword><CR>"
map <silent> <F3> "<Esc>:match ErrorMsg '\%>80v.\+'<CR>"
map <silent> <F7> "<Esc>:silent setlocal spell! spelllang=fr<CR>"
map <silent> <F8> "<Esc>:setl noai nocin nosi inde=<CR>"
nmap j gj
nmap k gk
nnoremap <C-L> :nohl<CR><C-L>
nnoremap Q <nop>
nmap \q :nohlsearch<CR>
vmap _c :s/^/#/gi<Enter>
vmap _C :s/^#//gi<Enter>
cnoremap <C-a> <Home>
cnoremap <C-b> <Left>
cnoremap <C-f> <Right>
cnoremap <C-d> <Delete>
cnoremap <M-b> <S-Left>
cnoremap <M-f> <S-Right>
cnoremap <M-d> <S-right><Delete>
cnoremap <Esc>b <S-Left>
cnoremap <Esc>f <S-Right>
cnoremap <Esc>d <S-right><Delete>
cnoremap <C-g> <C-c>
endif
" markdown
set nofoldenable
" for perl
"au BufNewFile *.pl 0put = \"#!/usr/bin/env perl\<nl>#\<nl>use strict;\<nl>use warnings;\<nl>\"|$|start!
"autocmd FileType perl "set number set textwidth=81
"let perl_extended_vars = 1
" Misc
" Hilight the chars over 80
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/