Skip to content

Instantly share code, notes, and snippets.

@mainiak
Last active April 19, 2024 14:22
Show Gist options
  • Save mainiak/5419663 to your computer and use it in GitHub Desktop.
Save mainiak/5419663 to your computer and use it in GitHub Desktop.
Vim, vimrc

My .vimrc

# vimtutor
vim ~/.vimrc

in vim

:r $VIMRUNTIME/vimrc_example.vim
:wq

in shell

cat >> ~/.vimrc <<EOF
" my setting
set background=dark
set number
set ignorecase

" ???
set mouse=

set expandtab
set shiftwidth=2
set softtabstop=2
set tabstop=2

" hiding buffers - don't know why
set hidden

"show tabs, EOL etc.
set list
"set lcs=tab:»·   "show tabs
"set lcs+=trail:· "show trailing spaces
set listchars=eol:$,space:·,tab:»#,trail:·

" write tag name and press CTRL+T
imap <C-t> <></><Esc>5hdiwp3lpT>
EOF
@mainiak
Copy link
Author

mainiak commented Apr 19, 2013

" php remove eol from end of file
autocmd FileType php setlocal noeol binary fileformats="mac,unix,dos"
autocmd FileType inc setlocal noeol binary fileformats="mac,unix,dos"
" src: http://stackoverflow.com/questions/4133501/vim-no-end-of-line-on-last-line-or-eof

@mainiak
Copy link
Author

mainiak commented Apr 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment