Home | Software > emacs > emacsfull | About

How to convert tabs to spaces ?

M-x untabify

How to go up one parent directory in dired ?


How to scroll both windows synchronously ?

  M-x scroll-all-mode

You should also consider this little piece of code to scroll by 1 line :

;; Scroller deux fenêtres à la fois
(defun scroll-both-windows-down (&optional n)
  (when (= (length (window-list)) 2)
    (scroll-up 1)
    (scroll-other-window 1)))

(defun scroll-both-windows-up (&optional n)
  (when (= (length (window-list)) 2)
    (scroll-down 1)
    (scroll-other-window-down 1)))

(global-set-key (kbd "M-<up>") 'scroll-both-windows-up)
(global-set-key (kbd "M-<down>") 'scroll-both-windows-down)

How to shrink/enlarge window horizontally

  C-x { / }

To shrink/enlarge by a fair amount prefix with C-u

  C-u C-x {

If you want even more amount, you should probably define a micro out of it and call multiple times with a single key stroke (e)

  C-x ( C-u C-x { C-x ) C-x e e e e ...

See EmacsMacros.

How to have the same size on all windows ?

C-x +

How to execute an external script on a region ?



C-u M-|

for inline replacement.

How to open a file on a remote system ?

Example : open the "/tmp/results.csv" file on the machine, ssh running on port 10020, login as root.

C-x C-f RET

then enter the filename like this


If you don't have a recent version of emacs, you need to install the tramp mode.

How to fix the <select> undefined error when pressing Shift-Up on a remote connexion (ssh) ?

It should be :

; Shift-up
(define-key input-decode-map "\e[1;2A" [S-up])  

It this doesn't work find out the correct key sequence by pressing C-q then S-Up and replace "\e[1;2A" with that.


contact : @ychaouche yacinechaouche at yahoocom

QR Code
QR Code How to convert tabs to spaces ? (generated for current page)