Vim

discuss

Beware Cat Shirt $21.68

Rise, Grind, Banana Find Shirt $21.68

Beware Cat Shirt $21.68

  1. 1 month ago
    Anonymous

    https://stackoverflow.com/questions/3983406/delete-newline-in-vim

    • 1 month ago
      Anonymous

      Aside from J and :j and :s you can also delete newlines in insert mode with backspace as long as you set
      :set backspace+=eol,start

      which is on by default in most configurations.

    • 1 month ago
      Anonymous

      I love learning new things

  2. 1 month ago
    Anonymous

    How do you exit Vim?

    • 1 month ago
      Anonymous

      For me, it's ZZ.

    • 1 month ago
      Anonymous

      why would you exit vim?

    • 1 month ago
      Anonymous

      only useful thing to know about vim

    • 1 month ago
      Anonymous

      :term
      :^)

    • 1 month ago
      Anonymous

      :q!

  3. 1 month ago
    Anonymous

    Haven't used it since university, most likely never will.

    • 1 month ago
      Anonymous

      why never will again?

  4. 1 month ago
    Anonymous

    I still use escape key for normal mode. It seems like I'm the only one who does this.

    • 1 month ago
      Anonymous

      What is the alternative?

      • 1 month ago
        Anonymous

        mapping caps lock to esc
        I have a split keyboard where the escape key is actually by default right to the left of a

        • 1 month ago
          Anonymous

          i map caps lock to ctrl, it's far more relevant than escape

      • 1 month ago
        Anonymous

        Ctrl+C, also this

        i map caps lock to ctrl, it's far more relevant than escape

      • 1 month ago
        Anonymous

        Esc emits ^] on linux terminals, so you can just use ctrl+] by default. I map ctrl+/ to esc as that's even easier to press. Ctrl+c works too but it cancels the action when you're doing stuff like visual block append, so it's functionally distinct from esc.

    • 1 month ago
      Anonymous

      I only use the escape key for normal mode.

  5. 1 month ago
    Anonymous

    helix

  6. 1 month ago
    Anonymous

    >glorified word processor with keybinds
    why anybody uses this shit is beyond me

    • 1 month ago
      Anonymous

      To feel special.
      Real people with jobs use VS Code.

      • 1 month ago
        Anonymous

        baseddevs sure xD. at my office most are using vim, particularly the ones that work in C. but "real people" use whatever works best in their scenario.

  7. 1 month ago
    Anonymous

    vim has the most intuitive key bindings. its like writing a sentence there is a subject noun verb
    >jfkdoaoaoaofoglfieowkalclvkskacuifekak
    see! its that easy!

    • 1 month ago
      Anonymous

      what's so good about vim
      why should I learn vim

      • 1 month ago
        Anonymous

        it is comfy, you have no idea how comfy

    • 1 month ago
      Anonymous

      made me laugh so hard. trying vim tutorial right now
      >delete words until end of line type d$
      why? who does that

      • 1 month ago
        Anonymous

        >why? who does that
        You're right, it's more likely someone would do c$, which deletes to the end of the line and also changes to insert mode.

        • 1 month ago
          Anonymous

          uhhh with C and D you dont need the $ right

          • 1 month ago
            Anonymous

            >uhhh with C and D you dont need the $ right
            That's true, on the other hand, there's c^ and d^ (also, c0 and d0) so it makes sense that there would be a corresponding c$ and d$.

  8. 1 month ago
    Anonymous

    It's brilliant.

    • 1 month ago
      Anonymous

      Don't get me wrong, but the only things that justify the existence of Vim to not enthusiasts nowadays are:
      > You are working in a bare metal server.
      > Need to use a CLI text editor or use WSL and don't want to use it with VScode.

      Because:
      >Extensions are a PITA, even on NeoVim
      >If you want just a simple text editor, why not just use Leafpad, Mousepad, Nano or the one that comes with Windows (if you use it)?.
      >If you want something to do SERIOUS work, VScodium, Emacs, Jetbrains products and few others are much better.
      >Every application have keybindings, you just need to learn them, this is not something exclusive to Vim.

      Depends on how basic. I like
      set showcmd
      set ruler
      set ignorecase
      set smartcase
      set expandtab

      And slightly more advanced:
      " highlight search
      " only highlight while typing
      set incsearch
      augroup vimrc-incsearch-highlight
      autocmd!
      autocmd CmdlineEnter /,? :set hlsearch
      autocmd CmdlineLeave /,? :set nohlsearch
      augroup END

      What's a good super basic .vimrc configuration?

      set number
      set mouse=a
      set smartindent
      set cursorline
      set showmatch
      syntax on
      syntax enable

      Vim relevant in 1980s when all programming languages required autistic spacing or they wouldn't compile/work, nowadays it's an autist timesink to pretend to look smart on the internet as you dick around for 30-40 years plus in a terminal to fill the gap of you not having a real job

      • 1 month ago
        Anonymous

        You're saying there's nil work scenario where one might actually use vim. I think you're a lying bullshitter demoralizer homosexual

  9. 1 month ago
    Anonymous

    My beloved.

    The best piece of tech ever created

  10. 1 month ago
    Anonymous

    Would be a lot better with windows notepad commands and not whatever the frick it uses now.

  11. 1 month ago
    Anonymous

    ED IS THE KING. ED IS MY SAVIOUR
    ED IS MY KING. ED IS THE EDITOR, THE STANDARD EDITOR.
    THE MIGHTY ED HAS SPOKEN!!!

    • 1 month ago
      Anonymous

      >install nixos minimum
      >no ed
      Frick this gay shit.

    • 1 month ago
      Anonymous

      43s/int/&, &

  12. 1 month ago
    Anonymous

    Don't get me wrong, but the only things that justify the existence of Vim to not enthusiasts nowadays are:
    > You are working in a bare metal server.
    > Need to use a CLI text editor or use WSL and don't want to use it with VScode.

    Because:
    >Extensions are a PITA, even on NeoVim
    >If you want just a simple text editor, why not just use Leafpad, Mousepad, Nano or the one that comes with Windows (if you use it)?.
    >If you want something to do SERIOUS work, VScodium, Emacs, Jetbrains products and few others are much better.
    >Every application have keybindings, you just need to learn them, this is not something exclusive to Vim.

  13. 1 month ago
    Anonymous

    What's a good super basic .vimrc configuration?

    set number
    set mouse=a
    set smartindent
    set cursorline
    set showmatch
    syntax on
    syntax enable

    • 1 month ago
      Anonymous

      Depends on how basic. I like
      set showcmd
      set ruler
      set ignorecase
      set smartcase
      set expandtab

      And slightly more advanced:
      " highlight search
      " only highlight while typing
      set incsearch
      augroup vimrc-incsearch-highlight
      autocmd!
      autocmd CmdlineEnter /,? :set hlsearch
      autocmd CmdlineLeave /,? :set nohlsearch
      augroup END

    • 1 month ago
      Anonymous

      Here'e a few more.

      set autoindent
      set colorcolumn=+1 " draw a line for the 80th column
      set expandtab
      set formatoptions-=tc
      set hlsearch
      set incsearch
      set laststatus=2
      set modeline
      set noerrorbells
      set noswapfile
      set paste
      set shiftwidth=2
      set smarttab
      set softtabstop=2
      set t_Co=256
      set t_vb=
      set tabstop=2
      set textwidth=79
      set visualbell
      set wildmenu
      set grepprg=git grep -n

      command! W w !sudo % > /dev/null

      nnoremap <PageDown> <Nop>
      nnoremap <PageUp> <Nop>

      autocmd WinEnter * set colorcolumn=+1 " Makes it easier to see which window is active
      autocmd WinEnter * set colorcolumn=0

  14. 1 month ago
    Anonymous

    cool logo. never used it and i don't code tho

  15. 1 month ago
    Anonymous

    So one weird thing is, I have the neovim vscode extension, as well as Copilot both configured for neovim and vscode, and it seems to not play very nice together. Like, hitting tab sometimes doesn't result in the completion completing and instead a literal tab is inserted. I have to like, wait half a second before pressing tab quickly. I should figure that out.

    Now I'm mostly using nvim only when I have like one or two files I want to edit in a terminal window I have. I haven't used it for big project workspaces opting for vscode. The latter just has all this stuff I've gotten used to like command shift f for the search, command p for file selection, navigating between terminal and split panes with ctrl + ` and cmd + 1 or whatever, opening the context menus.

    I did install a bunch of mini.vim stuff but crap man it's hard to figure out how to use would take a bunch of time.

    I haven't really scratched the surface of even using the keybinds in vscode with the extension. Mostly it's like... oh, I can navigate with hjkl or go back and forward a word or go to the start/end of a line or change with `c w` or something, and that was a big improvement. I cringe thinking about how I used to do things.

    sed kind of search and replace also cool. Still I'm babby.

    • 1 month ago
      Anonymous

      Oh yeah, also macros. VSCode has extensions that will do things but I have situations sometimes where I want to make repetitive edits to lines, say a parameter list where like, you have lines like
      ```
      self.forgot_underscore_1
      self.forgot_underscore_2
      self.some_other_thing.forgot_underscore_3
      ```

      that should be

      ```
      self._forgot_underscore_1
      self._forgot_underscore_2
      self.some_other_thing._forgot_underscore_3
      ```

      you can start on the first line and do these keystrokes:

      ```
      $ (go to end of line)
      q a (start recording macro to a register)
      F . (go to last dot)
      a _ (insert underscore)
      esc
      j
      $ (go to end of line)
      q (stop recording macro)
      ```

      After this point, say you have like 30 lines of this kind of thing, you just do
      ```
      30 @a
      ```

      invoking the macro and boom, bulk edit.

      Also I like the ctrl a thing to increment numbers

      maybe with regex search and replace you can accomplish the same things better. I am surely far worse at this kind of thing than long time emacs and vim text editing chads but even small things like this have helped me already.

    • 1 month ago
      Anonymous

      You aren't gonna get into a secret club, even if there is one they won't let you in. You're wasting your time, get a min wage job and have 100k in the bank in the time it would take to become a vim god

      • 1 month ago
        Anonymous

        i'd say even if you don't ascend to the level of "vim god" basically everyone should use that extension and the keybinds lol. So much better than the default. I find myself wanting it *anywhere* i enter text in a computer

  16. 1 month ago
    Anonymous

    micro is better

  17. 1 month ago
    Anonymous

    NOMODES

  18. 1 month ago
    Anonymous

    I only use vim when i have to make small changes to files on the server, if it takes more then 10 seconds ill open it using my ide
    I dont care about text editing, ill never learn vim deeply because my time is better spent learning data structures algorithms or literally anything else, i dont care how to the letters get to their place i only care about the logic of the software and i would rather use a program that has a minimal mental load so i can focus on the important stuff, i would rather use a mouse to select text than have to think about weird shortcuts, text editing should be simple and intuitive, plus im already really quick and precise with the mouse because of fps games

  19. 1 month ago
    Anonymous

    >recording

  20. 1 month ago
    Anonymous

    Chad Neovim is the real deal. I like VS Code but on my older laptop it makes my fans run wild.

    https://nvchad.com

    Download it in one line in terminal:
    https://github.com/NvChad/NvChad

    • 1 month ago
      Anonymous

      nvchad is bloat, just build up your own config adding only what you need

      • 1 month ago
        Anonymous

        In the end you will be faced against someone how has spent all the time you wasted on configuring your vim on actually learning how to develop software and you will loose

        • 1 month ago
          Anonymous

          Only a israelite would have your mindset.

          • 1 month ago
            Anonymous

            Why is that israeli?

          • 1 month ago
            Anonymous

            The chad jetbrains is from Czech Republic not very israeli

            The virgin vim was actually developed by an Israeli mossad agent

        • 1 month ago
          Anonymous

          >In the end you will be faced against someone how has spent all the time you wasted on configuring your vim
          That's literally what happens when I'm using a vim distro. Those shits break so easily because they install many useless "pretty" icons, and I need to modify some janky Lua code if things break while using my own config basically just copy pasting the vim lsp plugin instructions on its github page

    • 1 month ago
      Anonymous

      Just use kickstart, it has everything you need.

  21. 1 month ago
    Anonymous

    the only purpose of vim is if you are ssh'ing somewhere and for some reason cant share the screen
    otherwise it is easier to just run the file with any other modern editor.

  22. 1 month ago
    Anonymous

    Custom :syn and :hi for project's code or logs is nice.

Comments are closed.