I'm trying to modify multiple occurrences of some word in c++ mode using iedit.
upon entering insert mode in iedit when multiple occurrences are highlighted, appending characters doesn't work as expected after the first character.
example:
test_rwlock(RWLock& rwlock)
{
rwlock.rdlock();
rwlock.unlock();
rwlock.wrlock();
rwlock.unlock();
}
when the cursor is on some rwlock (on l), I'm pressing SPC s e i X ESC ESC, I get
rwXlock on that line, and nothing changes on the rest (i.e., remain rwlock).
if the cursor was on r, all occurrences would get the X, as expected
if more than one character is inserted, e.g. upon pressing SPC s e i X Y ESC ESC when cursor is on l, I get rwXYlock on that line, and nothing changes on the rest (i.e., remain rwlock).
if the cursor was on r, though, the instance on that line becomes rwXYlock, but the rest remain rwXlock.
when cursor on r and pressing SPC s e c w X ESC ESC, I get on that line X.rdlock(), while other lines become Xrwlock.unlock, Xrwlock.unlock, Xrwlock.wrlock, ...
I'm trying to modify multiple occurrences of some word in c++ mode using iedit.
upon entering insert mode in iedit when multiple occurrences are highlighted, appending characters doesn't work as expected after the first character. example: test_rwlock(RWLock& rwlock) { rwlock.rdlock(); rwlock.unlock();
} when the cursor is on some rwlock (on l), I'm pressing SPC s e i X ESC ESC, I get rwXlock on that line, and nothing changes on the rest (i.e., remain rwlock). if the cursor was on r, all occurrences would get the X, as expected if more than one character is inserted, e.g. upon pressing SPC s e i X Y ESC ESC when cursor is on l, I get rwXYlock on that line, and nothing changes on the rest (i.e., remain rwlock). if the cursor was on r, though, the instance on that line becomes rwXYlock, but the rest remain rwXlock.
when cursor on r and pressing SPC s e c w X ESC ESC, I get on that line X.rdlock(), while other lines become Xrwlock.unlock, Xrwlock.unlock, Xrwlock.wrlock, ...
System Info:
OS: Ubuntu 16.04.3 LTS Emacs: 25.3.1 Spacemacs: 0.200.10 Spacemacs branch: master (rev. 4bb4cb469) Distribution: spacemacs Layers: ( python helm gtags markdown (auto-completion :variables auto-completion-enable-help-tooltip t auto-completion-enable-snippets-in-popup t auto-completion-enable-sort-by-usage t) better-defaults emacs-lisp (git :variables git-magit-status-fullscreen t) ibuffer markdown (shell :variables shell-default-height 30 shell-default-position 'bottom shell-default-term-shell "/bin/zsh") (c-c++ :variables c-c++-default-mode-for-headers 'c++-mode c-c++-enable-clang-support t) syntax-checking )
user_config: (require 'ggtags) (add-hook 'c-mode-common-hook (lambda () (when (derived-mode-p 'c-mode 'c++-mode 'java-mode 'asm-mode) (ggtags-mode 1))))
(define-key ggtags-mode-map (kbd "C-c g s") 'ggtags-find-other-symbol) (define-key ggtags-mode-map (kbd "C-c g h") 'ggtags-view-tag-history) (define-key ggtags-mode-map (kbd "C-c g r") 'ggtags-find-reference) (define-key ggtags-mode-map (kbd "C-c g f") 'ggtags-find-file) (define-key ggtags-mode-map (kbd "C-c g c") 'ggtags-create-tags) (define-key ggtags-mode-map (kbd "C-c g u") 'ggtags-update-tags)
(define-key ggtags-mode-map (kbd "M-,") 'pop-tag-mark)
(spacemacs/toggle-truncate-lines-on)
(global-set-key (kbd "C-[") 'forward-char) (global-set-key (kbd "C-]") 'backward-char)
(setq iedit-occurrence-context-lines 3)
(setq-default x-selection-timeout 10) (setq-default x-select-enable-primary t) (setq-default x-select-enable-clipboard t) (setq-default save-interprogram-paste-before-kill t)
same happens if (setq iedit-occurrence-context-lines 3) is commented out, so this is not the cause.