関西Vim勉強会#5 vimrcの書き方

6,075 views

Published on

関西Vim勉強会#5でvimrcの書き方について簡単に説明したときの発表資料

Published in: Technology, Education
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,075
On SlideShare
0
From Embeds
0
Number of Embeds
641
Actions
Shares
0
Downloads
39
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

関西Vim勉強会#5 vimrcの書き方

  1. 1. if has('win32') " or has('win64') " for Windows elif has('mac') " or has('macunix') " for Mac else " for others endif if has('ruby') " using ruby interface endif
  2. 2. if filereadable(expand('~/.vimrc.local')) source ~/.vimrc.local endif
  3. 3. :edit $MYVIMRC :w :source $MYVIMRC
  4. 4. autocmd BufEnter * let b:count += 1
  5. 5. autocmd! autocmd BufEnter * let b:count += 1
  6. 6. augroup vimrc autocmd! augroup END autocmd vimrc BufEnter * let b:count += 1 augroup vimrc autocmd BufLeave * let b:count += 1 augroup END
  7. 7. set guioptions& set guioptions-=T set guioptions-=m
  8. 8. function! Hoge() echo "hoge" endfunction command! Fuga echo "fuga"
  9. 9. nnoremap <Space> :<C-u>echo "hoge"<CR>
  10. 10. set sts=4 sw=4 ts=4 augroup vimrc autocmd Filetype ruby setlocal sts=2 sw=2 ts=2 augroup END
  11. 11. let g:vimrc_local_finish = 1

×