home.social

#vimrc — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #vimrc, aggregated by home.social.

fetched live
  1. С Vim удобно программировать (часть II)

    Это вторая часть публикации. В первой мы разобрали основные настройки редактора, позволяющие сделать процесс набора программы более удобным. Здесь рассмотрим плагины и скрипты для запуска программ на разных языках из редактора Vim.

    habr.com/ru/articles/1025124/

    #linux #vim #vimrc #bash #diy_или_сделай_сам #repl #ide

  2. Do you use the Vim support in Obsidian? You know there's no ESC key on the iPhoneOS on-screen keyboard.

    Here's a minimal .obsidian.vimrc to use, which includes a remap that lets you use jj in insert mode to act as ESC

    #vimrc #obsidian #tips #tipoftheday #productivity

  3. Do you use the Vim support in Obsidian? You know there's no ESC key on the iPhoneOS on-screen keyboard.

    Here's a minimal .obsidian.vimrc to use, which includes a remap that lets you use jj in insert mode to act as ESC

    #vimrc #obsidian #tips #tipoftheday #productivity

  4. I don't usually need my vimrc when I'm editing something w/ sudo -- but I really need to remember `sudoedit` or `sudo -e` for when I do ... (just wanted to :ALEFix some json because I don't want to think about the linter/fixer under the hood)

    #vimrc #shell

  5. It's 2024 anf currently I'm reading about #makefile. For the same project I've been reading about #vimrc. And yeah, this all feels right.

    In the last days I've run into a tainted kernel panic which I could only solve because of my years of #gentoo and #portage.

    And yeah - all of this feels really good and right!

  6. It's 2024 anf currently I'm reading about #makefile. For the same project I've been reading about #vimrc. And yeah, this all feels right.

    In the last days I've run into a tainted kernel panic which I could only solve because of my years of #gentoo and #portage.

    And yeah - all of this feels really good and right!

  7. My #vimrc i wrote 20 years ago and still in use today

    " pancake's exposee for vim:
    let fs=0
    fun Exposee()
    if (g:fs == 0)
    res 1000
    vertical res 1000
    let g:fs=1
    else
    exe "normal \<C-W>="
    let g:fs=0
    endif
    endfun
    map <F10> :call Exposee()<cr>

    "some nice keymappings
    map <F1> :vsp<cr>
    map <F2> :sp<cr>
    map <F3> :sp<cr>:e .<cr>
    map <F4> :q<cr>
    map <F5> <C-W>=

    map <C-A> :FZF<cr>
    imap <C-O> <ESC><C-X><C-O>

    " fine zooming
    map <C-J> 2<C-W>+
    map <C-K> 2<C-W>-
    map <C-L> 2<C-W>>
    map <C-H> 2<C-W><

    " fine frame moving
    map <C-Y> <C-W>h
    map <C-U> <C-W>j
    map <C-I> <C-W>k
    map <C-O> <C-W>l

  8. My #vimrc i wrote 20 years ago and still in use today

    " pancake's exposee for vim:
    let fs=0
    fun Exposee()
    if (g:fs == 0)
    res 1000
    vertical res 1000
    let g:fs=1
    else
    exe "normal \<C-W>="
    let g:fs=0
    endif
    endfun
    map <F10> :call Exposee()<cr>

    "some nice keymappings
    map <F1> :vsp<cr>
    map <F2> :sp<cr>
    map <F3> :sp<cr>:e .<cr>
    map <F4> :q<cr>
    map <F5> <C-W>=

    map <C-A> :FZF<cr>
    imap <C-O> <ESC><C-X><C-O>

    " fine zooming
    map <C-J> 2<C-W>+
    map <C-K> 2<C-W>-
    map <C-L> 2<C-W>>
    map <C-H> 2<C-W><

    " fine frame moving
    map <C-Y> <C-W>h
    map <C-U> <C-W>j
    map <C-I> <C-W>k
    map <C-O> <C-W>l

  9. I'm afraid to post my real #vimrc because it's full of frivolous plugins I'd get roasted for, and anyway I mostly use neovim these days, but here's what I start with when I need a halfway sane editor on a remote machine:

    :set sw=4 ts=4 et ai lbr

    RIP, Bram. I had very brief interactions with him, when I sent a PR on GitHub and he politely informed me that's not how we do things and to send an email. (Then I accidentally became maintainer of the syntax file I was trying to edit.)

  10. I'm afraid to post my real #vimrc because it's full of frivolous plugins I'd get roasted for, and anyway I mostly use neovim these days, but here's what I start with when I need a halfway sane editor on a remote machine:

    :set sw=4 ts=4 et ai lbr

    RIP, Bram. I had very brief interactions with him, when I sent a PR on GitHub and he politely informed me that's not how we do things and to send an email. (Then I accidentally became maintainer of the syntax file I was trying to edit.)

  11. among the many i like

    set nowrap
    set colorcolumn=80

    #vimrc

  12. @philiph This is my "standard" vimrc these days, I have gotten way, way more stuff crammed into one in the past with vim bundles and plugins and and... but this works pretty well for my needs.

    ix.io/4hqu

    #vim #vimrc

  13. #vim doesn't seem to like TERM=screen-256color which #tmux sets for its 'termguicolor' setting, sooo:

    if &term != "screen-256color"
    set tgc " causes issues inside tmux
    endif
    #vimrc snippet

  14. @hyde cool, I might adopt a couple of your lines for my !
    github.com/maze88/dotfiles

  15. CW: re: emacs :(

    @cadadr @ljwrites Said hack, since there may be interest:

    " Transparent editing of gpg encrypted files.
    " By Wouter Hanegraaff <[email protected]>
    augroup encrypted
    au!

    " First make sure nothing is written to ~/.viminfo while editing
    " an encrypted file.
    autocmd BufReadPre,FileReadPre *.asc set viminfo=
    " We don't want a swap file, as it writes unencrypted data to disk
    autocmd BufReadPre,FileReadPre *.asc set noswapfile
    " Switch to binary mode to read the encrypted file
    autocmd BufReadPre,FileReadPre *.asc set bin
    autocmd BufReadPre,FileReadPre *.asc let ch_save = &ch|set ch=2
    autocmd BufReadPost,FileReadPost *.asc '[,']!gpg --decrypt 2> /dev/null
    " Switch to normal mode for editing
    autocmd BufReadPost,FileReadPost *.asc set nobin
    autocmd BufReadPost,FileReadPost *.asc let &ch = ch_save|unlet ch_save
    autocmd BufReadPost,FileReadPost *.asc execute ":doautocmd BufReadPost " . expand("%:r")

    " Convert all text to encrypted text before writing
    autocmd BufWritePre,FileWritePre *.asc '[,']!gpg --default-recipient-self -ae 2>/dev/null
    " Undo the encryption so we are back in the normal text, directly
    " after the file has been written.
    autocmd BufWritePost,FileWritePost *.asc u
    augroup END

    #vim #vi #JustVimThings #gpg #pgp #vimrc #WouterHanegraaff

  16. Hello #vim master/mistress,

    I use the vim8 pack plugin feature.

    My .vimrc contain the NERDTree plugin config but this plugin is optional (pack/opt).

    So each time I launch vim I have a error message almost "cannot configure NERDTree".

    How can I test if NERDtree is loaded and configure it only in this case?

    Thanks for you advice.

    #vim
    #vimrc

  17. #Checkliste für #Vim als #IDE für #Python

    #Checkliste für die #Vervollständigung der #Datei #Vimrc

    Bezüglich #Debugging sagt der Vortragende er benutze dafür nicht Vim, sondern #iPython und #ipdb (#IPython #pdb).

    I will insert breakpoints with a shortkey, open another terminal window and start my program, waiting until the breakpoint is hit and then inspect the scope.

    ipython.org/
    pypi.org/project/ipdb/

    youtu.be/YhqsjUUHj6g

  18. @codesections
    I'm considering giving #vim a try again, especially since I find myself more and more coding on my phone using #Termux with on-screen keyboard.
    Do you have your #vimrc online somewhere, as it looks useful, or can recommend some useful repositories for it?