git reset --soft HEAD~1 // to soft reset (preserve changes)
git reset HEAD /files/you/wish/to/unstageYou can now commit the staged files and checkout the unstaged files
git commit
git checkout /files/you/wish/to/checkoutThat's it!
git reset --soft HEAD~1 // to soft reset (preserve changes)
git reset HEAD /files/you/wish/to/unstagegit commit
git checkout /files/you/wish/to/checkoutC-x ( to start recording
C-x ) to stop recording
C-x e to executeC-u N C-x eM-x xterm-mouse-mode;; Show line numbers
(global-linum-mode t)
;; Separate text with space and |
(setq linum-format "%4d \u2502 ")
This;is;a;test
M-x replace-string <RET> ; <RET> C-q C-j
This
is
a
test
(global-set-key (kbd "<f5>") 'balance-windows)
(global-set-key (kbd "<f6>") 'shrink-window)
(global-set-key (kbd "<f7<") 'enlarge-window)
(global-set-key (kbd "<f8>") 'enlarge-window-horizontally)
(global-set-key (kbd "<f9>") 'shrink-window-horizontally)
M-x toggle-read-onlyC-x C-qM-x occur$ export LESS="-eirMX";; Resize the windows
(global-set-key [f5] 'balance-windows)
(global-set-key [f6] 'shrink-window)
(global-set-key [f7] 'enlarge-window)
(global-set-key [f8] 'enlarge-window-horizontally)
(global-set-key [f9] 'shrink-window-horizontally)
;; Swap windows
(defun swap-windows ()
(interactive)
(if (= (count-windows) 2)
(let* ((this-win-buffer (window-buffer))
(next-win-buffer (window-buffer (next-window))))
(set-window-buffer (next-window) this-win-buffer)
(set-window-buffer (selected-window) next-win-buffer))))
(define-key ctl-x-4-map "s" 'swap-windows)
;; Toggle buffer splits from vertical to horizontal
(defun toggle-window-split ()
(interactive)
(if (= (count-windows) 2)
(let* ((this-win-buffer (window-buffer))
(next-win-buffer (window-buffer (next-window)))
(this-win-edges (window-edges (selected-window)))
(next-win-edges (window-edges (next-window)))
(this-win-2nd (not (and (<= (car this-win-edges)
(car next-win-edges))
(<= (cadr this-win-edges)
(cadr next-win-edges)))))
(splitter
(if (= (car this-win-edges)
(car (window-edges (next-window))))
'split-window-horizontally
'split-window-vertically)))
(delete-other-windows)
(let ((first-win (selected-window)))
(funcall splitter)
(if this-win-2nd (other-window 1))
(set-window-buffer (selected-window) this-win-buffer)
(set-window-buffer (next-window) next-win-buffer)
(select-window first-win)
(if this-win-2nd (other-window 1))))))
(define-key ctl-x-4-map "t" 'toggle-window-split)