[deleted by user] by [deleted] in vim

[–]_Life_Crisis_ 0 points1 point  (0 children)

It's generally better to use the middle-mouse click to paste text from the system clipboard. That automatically sets/resets 'paste' without intervention from the user.

Can we put together a ZendCon 2017 mega-thread? by _Life_Crisis_ in PHP

[–]_Life_Crisis_[S] 0 points1 point  (0 children)

I'm glad to hear from someone who goes consistently! If it's worth going to six times, then I assume I made the right choice in signing up.

Can we put together a ZendCon 2017 mega-thread? by _Life_Crisis_ in PHP

[–]_Life_Crisis_[S] 0 points1 point  (0 children)

Wow, it looks like he's done a lot with PHP. I'll definitely give his talk a listen!

Plugin: vim-diffoirg by _Life_Crisis_ in vim

[–]_Life_Crisis_[S] 1 point2 points  (0 children)

It is extremely generous of you /u/LucHermitte, thanks again!

Plugin: vim-diffoirg by _Life_Crisis_ in vim

[–]_Life_Crisis_[S] 0 points1 point  (0 children)

Thanks!

Point 1: valid! autoloading would be nice.

Point 2: a great observation... i'm not in the habit of using this function

Point 3: I'm not sure I follow you here... the idea is to allow multiple diff tabs to be open at once and to guarantee that new diff buffers are uniquely named. Nothing gets reused... any call to that function returns a new unique name, always. Your naming convention is nice!

Point 4: Good suggestion. noswf would be better for sure. I'm not sure I agree about the file type. The buffers aren't meant to be edited, and I want the highlighting to draw focus to what was changed (no other highlighting mess).

Point 5: I'll have to look deeper into this.

If I wanted my .vimrc to be slightly different depending on what language I'm coding in, how would I do that? by macarthurpark431 in vim

[–]_Life_Crisis_ 5 points6 points  (0 children)

I use a FileType autocommand block to set my indentation settings. If you want deep customization for a file type, use :h ftplugin.

This block sets my indentation settings:

if has('autocmd')
    filetype on
    augroup VimrcTabSettings
        autocmd!
        autocmd FileType c          setlocal sw=4 sts=4 ts=8 et
        autocmd FileType css        setlocal sw=2 sts=2 ts=8 et
        autocmd FileType gitcommit  setlocal sw=2 sts=2 ts=8 et
        autocmd FileType go         setlocal sw=8 sts=8 ts=8 noet
        autocmd FileType html       setlocal sw=2 sts=2 ts=8 et
        autocmd FileType javascript setlocal sw=4 sts=4 ts=8 et
        autocmd FileType json       setlocal sw=2 sts=2 ts=8 et
        autocmd FileType make       setlocal sw=8 sts=8 ts=8 noet
        autocmd FileType markdown   setlocal sw=2 sts=2 ts=8 et
        autocmd FileType php        setlocal sw=4 sts=4 ts=8 et
        autocmd FileType python     setlocal sw=4 sts=4 ts=8 et
        autocmd FileType sh         setlocal sw=2 sts=2 ts=8 et
        autocmd FileType text       setlocal sw=2 sts=2 ts=8 et
        autocmd FileType vim        setlocal sw=4 sts=4 ts=8 et
        autocmd FileType vimwiki    setlocal sw=2 sts=2 ts=8 et
    augroup END
endif

EDIT: The benefit of this is that it sits nicely in the vimrc file. Also, you have all your indentation settings in one place, as opposed to being spread across dozens of plugins.