Skip to content

Instantly share code, notes, and snippets.

@mkocikowski
Last active April 18, 2017 21:54
Show Gist options
  • Select an option

  • Save mkocikowski/3e8ce171dcab12ad173f to your computer and use it in GitHub Desktop.

Select an option

Save mkocikowski/3e8ce171dcab12ad173f to your computer and use it in GitHub Desktop.

Revisions

  1. mkocikowski revised this gist Apr 18, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .vimrc
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,7 @@ set tags=./tags;$HOME
    set tabstop=4 softtabstop=4 shiftwidth=4 sta expandtab autoindent

    " Strip trailing whitespace on save
    " autocmd FileType python,javascript,json autocmd BufWritePre <buffer> :%s/\s\+$//e
    autocmd FileType python,javascript,json,markdown,sql autocmd BufWritePre <buffer> :%s/\s\+$//e

    " ignore case in search
    "set ic
  2. mkocikowski revised this gist Mar 28, 2017. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,9 @@ map <C-\> {gq}
    execute pathogen#infect()

    " yaml
    autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab

    " always display status line
    set laststatus=2

  3. mkocikowski revised this gist Mar 6, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .vimrc
    Original file line number Diff line number Diff line change
    @@ -47,7 +47,7 @@ let g:go_fmt_command = "goimports"
    " https://github.com/scrooloose/nerdtree
    nmap <F9> :NERDTreeToggle<CR>
    " http://majutsushi.github.io/tagbar
    " https://github.com/majutsushi/tagbar
    nmap <F8> :TagbarToggle<CR>
    let g:tagbar_width = 70

  4. mkocikowski revised this gist Mar 2, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .vimrc
    Original file line number Diff line number Diff line change
    @@ -41,7 +41,7 @@ au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
    nnoremap <C-n> :bnext<CR>
    nnoremap <C-p> :bprevious<CR>
    " https://github.com/fatih/vim-go#settings
    " https://github.com/fatih/vim-go
    let g:go_fmt_command = "goimports"

    " https://github.com/scrooloose/nerdtree
  5. mkocikowski revised this gist Mar 2, 2017. 1 changed file with 56 additions and 3 deletions.
    59 changes: 56 additions & 3 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -23,6 +23,59 @@ set tabstop=4 softtabstop=4 shiftwidth=4 sta expandtab autoindent
    " Strip trailing whitespace on save
    " autocmd FileType python,javascript,json autocmd BufWritePre <buffer> :%s/\s\+$//e

    " search highlighting ; clear with <CR>
    set hlsearch
    nnoremap <CR> :nohlsearch<CR><CR>
    " ignore case in search
    "set ic

    " turn on line numbers
    "set number

    " set marked column at 73
    set colorcolumn=73

    " set additional escape key in insert mode
    imap jj <Esc>`^
    imap ;; <Esc>`^
    au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown

    nnoremap <C-n> :bnext<CR>
    nnoremap <C-p> :bprevious<CR>
    " https://github.com/fatih/vim-go#settings
    let g:go_fmt_command = "goimports"

    " https://github.com/scrooloose/nerdtree
    nmap <F9> :NERDTreeToggle<CR>
    " http://majutsushi.github.io/tagbar
    nmap <F8> :TagbarToggle<CR>
    let g:tagbar_width = 70

    " https://github.com/jstemmer/gotags
    let g:tagbar_type_go = {
    \ 'ctagstype' : 'go',
    \ 'kinds' : [
    \ 'p:package',
    \ 'i:imports:1',
    \ 'c:constants',
    \ 'v:variables',
    \ 't:types',
    \ 'n:interfaces',
    \ 'w:fields',
    \ 'e:embedded',
    \ 'm:methods',
    \ 'r:constructor',
    \ 'f:functions'
    \ ],
    \ 'sro' : '.',
    \ 'kind2scope' : {
    \ 't' : 'ctype',
    \ 'n' : 'ntype'
    \ },
    \ 'scope2kind' : {
    \ 'ctype' : 't',
    \ 'ntype' : 'n'
    \ },
    \ 'ctagsbin' : 'gotags',
    \ 'ctagsargs' : '-sort -silent'
    \ }
  6. mkocikowski revised this gist May 20, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -23,3 +23,6 @@ set tabstop=4 softtabstop=4 shiftwidth=4 sta expandtab autoindent
    " Strip trailing whitespace on save
    " autocmd FileType python,javascript,json autocmd BufWritePre <buffer> :%s/\s\+$//e

    " search highlighting ; clear with <CR>
    set hlsearch
    nnoremap <CR> :nohlsearch<CR><CR>
  7. mkocikowski revised this gist Jul 30, 2015. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    syntax on
    filetype indent plugin on

    " wrap text
    map <C-\> {gq}
    execute pathogen#infect()

    " always display status line
    set laststatus=2

    @@ -16,3 +16,10 @@ set statusline+=%F\ %l\:%c
    " where to look for ctags
    " start in the current directory, work your way all the way up to $HOME
    set tags=./tags;$HOME

    " Wrapping and tabs.
    set tabstop=4 softtabstop=4 shiftwidth=4 sta expandtab autoindent

    " Strip trailing whitespace on save
    " autocmd FileType python,javascript,json autocmd BufWritePre <buffer> :%s/\s\+$//e

  8. mkocikowski revised this gist Jul 1, 2015. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -12,3 +12,7 @@ set autochdir

    " display file name, line, column
    set statusline+=%F\ %l\:%c

    " where to look for ctags
    " start in the current directory, work your way all the way up to $HOME
    set tags=./tags;$HOME
  9. mkocikowski revised this gist Jun 26, 2015. 1 changed file with 18 additions and 0 deletions.
    18 changes: 18 additions & 0 deletions python.vim
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    " https://dev.launchpad.net/UltimateVimPythonSetup

    " Wrapping and tabs.
    set tw=78 ts=4 sw=4 sta et sts=4 ai

    " More syntax highlighting.
    let python_highlight_all = 1

    " Auto completion via ctrl-space (instead of the nasty ctrl-x ctrl-o)
    set omnifunc=pythoncomplete#Complete
    inoremap <Nul> <C-x><C-o>
    " Wrap at 72 chars for comments.
    set formatoptions=cq textwidth=72 foldignore= wildignore+=*.py[co]

    " Highlight end of line whitespace.
    highlight WhitespaceEOL ctermbg=red guibg=red
    match WhitespaceEOL /\s\+$/
  10. mkocikowski revised this gist Jun 26, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    syntax on
    filetype indent plugin on

    " wrap text
    map <C-\> {gq}
    " always display status line
  11. mkocikowski created this gist Jun 26, 2015.
    12 changes: 12 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    syntax on
    filetype indent plugin on
    map <C-\> {gq}
    " always display status line
    set laststatus=2

    " auto change dir to current file
    set autochdir

    " display file name, line, column
    set statusline+=%F\ %l\:%c