profile
viewpoint
Martin Kletzander nertpinx Red Hat

kubevirt/libvirt 30

Vanilla dockerized libvirt image, used as a base for kubevirt

libguestfs/virt-v2v 6

Virt-v2v converts guests from foreign hypervisors to run on KVM

nertpinx/pywall 1

Console twitterwall implementation in Python

nertpinx/cmix 0

cmix is a lossless data compression program aimed at optimizing compression ratio at the cost of high CPU/memory usage.

nertpinx/cockpit 0

There's code a goin' on

nertpinx/exercises 0

Various exercises to give to people for fun and profit

nertpinx/gentoo 0

The official mirror of the Gentoo ebuild repository

nertpinx/git-publish 0

Prepare and store patch revisions as git tags

nertpinx/jq 0

Command-line JSON processor

issue closedsyl20bnr/spacemacs

Auto-indentation on paste is broken

Description :octocat:

When pasting the spacemacs//yank-indent-region function indents differently than indent-region.

Reproduction guide :beetle:

  • Start Emacs
  • Open a C file.
  • Paste part of code somewhere

Observed behaviour: :eyes: :broken_heart: The code is indented with wrong offset (2 spaces) and needs to be fixed by indenting the whole thing as an extra command. It also indents way too many lines below the pasted one (e.g. indenting whole condition body when just pasting in a condition) and indents things that are past 80 characters. This makes fixing it back very annoying, especially when this auto-indentation cannot be disabled by an easy toggle or variable change.

Expected behaviour: :heart: :smile: Only affected code is indented and it respects the same indentation rules as when marking a region and pressing <TAB>. And if not that then at least there would be a way to turn the auto-indentation after paste off globally.

System Info :computer:

  • OS: gnu/linux
  • Emacs: 26.3
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. 23976ab799b0)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: emacs
  • Completion: helm
  • Layers:
(emacs-lisp git helm version-control
            (markdown :variables markdown-live-preview-engine 'vmd)
            org semantic
            (lsp :variables lsp-rust-server 'rust-analyzer lsp-rust-analyzer-server-display-inlay-hints t)
            cscope
            (c-c++ :variables c-c++-enable-clang-support t)
            (python :variables python-shell-prompt-regexp "In \\[[0-9]+\\]: " python-indent-guess-indent-offset-verbose nil python-shell-prompt-detect-failure-warning nil)
            (shell :variables shell-default-position 'right shell-default-shell 'multi-term term-bind-key-alist
                   '(("C-c C-c" . term-interrupt-subjob)
                     ("C-k" . term-send-kill-line)
                     ("C-p" . previous-line)
                     ("C-n" . next-line)
                     ("C-m" . term-send-return)
                     ("C-y" . term-paste)
                     ("M-f" . term-send-forward-word)
                     ("M-b" . term-send-backward-word)
                     ("M-p" . term-send-up)
                     ("M-n" . term-send-down)
                     ("<M-backspace>" . term-send-backward-kill-word)
                     ("<C-backspace>" . term-send-backward-kill-word)
                     ("<C-left>" . term-send-backward-word)
                     ("<C-right>" . term-send-forward-word)
                     ("M-d" . term-send-delete-word)
                     ("M-." . term-send-raw-meta)
                     ("M-y" . term-send-raw-meta)
                     ("C-/" . term-send-raw))
                   term-unbind-key-alist
                   '("C-c" "C-x" "C-h" "C-y"))
            (shell-scripts)
            (spell-checking :variables ispell-program-name "hunspell-emacswrapper")
            treemacs version-control erc mu4e xkcd
            (evil-snipe :variables evil-snipe-enable-alternate-f-and-t-behaviors t)
            gnus selectric ocaml
            (rust :variables rust-format-on-save t)
            (docker :variables docker-dockerfile-backend 'lsp)
            dap imenu-list major-modes html javascript)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB OLDXMENU X11 XDBE XIM THREADS

Backtrace :paw_prints:


closed time in 19 days

nertpinx

issue commentsyl20bnr/spacemacs

Auto-indentation on paste is broken

Forgot to close this as it is basically explained by https://github.com/syl20bnr/spacemacs/issues/13646#issuecomment-648955999 . Thanks again.

nertpinx

comment created time in 19 days

issue commentkovidgoyal/kitty

How to run ` kitty +kitten ssh ...` for second-level servers in chain ?

With new enough ssh client you should be able to do kitty +kitten ssh -J jump_server destination_server.

does not work for me unfortunately

Well, then I guess you can create an ssh tunnel ssh -L localhost:12345:machine2:22 machine1 and then in another shell do kitty +kitten localhost -p 12345. (written from the top of my head, not tested).

collegeimprovements

comment created time in 3 months

issue commentsyl20bnr/spacemacs

Auto-indentation on paste is broken

Looks like that could do the trick, thanks.

@alexey0308 do I understand it correctly that it would also be solved by properly setting up the language server configuration (e.g. .clang-format in case of C)? That would be the best resolution for me, even though it would require creating few files based on my .dir-locals.el.

nertpinx

comment created time in 3 months

more