aboutsummaryrefslogtreecommitdiff
path: root/vim/config/command.vim
blob: 705f29b0926c23f68d0f5e66392b18fa6914d4c2 (plain)
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
" Keep plenty of command and search history, because disk space is cheap
set history=2000

" Always tell me the number of lines changed by a command
set report=0

" Command-line based features
if has('cmdline_info')

  " Show my current position in the status bar
  set ruler

  " Show the keystrokes being entered in the screen
  set showcmd

  " Show the mode we're using if not normal mode (e.g. --INSERT--)
  set showmode
endif

" Don't write the output of :make to the terminal
set shellpipe=>

" Always use forward slashes, I very seldom need to use Vim on Windows for
" more than scratch space anyway
if exists('+shellslash')
  set shellslash
endif

" \d inserts the current local date from date(1)
nnoremap <silent>
      \ <Leader>d
      \ :<C-U>read !date<CR>
" \D inserts the current UTC date from date(1)
nnoremap <silent>
      \ <Leader>D
      \ :<C-U>read !date -u<CR>

" \m in normal mode starts a mail message with the current line
nmap <silent>
      \ <Leader>m
      \ :<C-U>.MailMutt<CR>
" \M in normal mode starts a mail message with the whole buffer
nmap <silent>
      \ <Leader>M
      \ :<C-U>%MailMutt<CR>
" \m in visual mode starts a mail message with the selected lines
vmap <silent>
      \ <Leader>m
      \ :MailMutt<CR>