emacs update
authorPeng Li <seudut@gmail.com>
Mon, 22 Aug 2016 02:24:49 +0000 (10:24 +0800)
committerPeng Li <seudut@gmail.com>
Mon, 22 Aug 2016 02:24:49 +0000 (10:24 +0800)
emacs.d/config.org
study-note.org

index 75f0332..596e4f7 100644 (file)
@@ -592,8 +592,8 @@ Use [[https://github.com/DarwinAwardWinner/ido-ubiquitous][ido-ubiquitous]] for
   (use-package ido-exit-target
     :ensure t
     :init
-    (mapcar (lambda (map)
-              (define-key map (kbd "C-j") #'ido-exit-target-split-window-right)
+    (mapcar '(lambda (map)
+              (define-key map (kbd "C-j") #'ido-exit-target-other-window)
               (define-key map (kbd "C-k") #'ido-exit-target-split-window-below))
             (list ido-buffer-completion-map
                   ;; ido-common-completion-map
@@ -2471,26 +2471,31 @@ Most use =C-o C-o= to switch buffers; =C-o x, v= to split window; =C-o o= to del
              (kill-buffer)
              (sd/delete-current-window))
      "kill" :exit t)
-    ("'" other-window "other" :exit t)
+
+    ;; ace-window
+    ;; ("'" other-window "other" :exit t)
     ;; ("a" ace-window "ace")
     ("s" ace-swap-window "swap")
+    ("D" ace-delete-window "ace-one" :exit t)
     ;; ("i" ace-maximize-window "ace-one" :exit t)
     ;; Windows undo - redo
     ("u" (progn (winner-undo) (setq this-command 'winner-undo)) "undo")
     ("r" (progn (winner-redo) (setq this-command 'winner-redo)) "redo")
-
+    
     ;; ibuffer, dired, eshell, bookmarks
-    ("D" ace-delete-window "ace-one" :exit t)
     ;; ("C-o" ido-switch-buffer nil :exit t)
     ("C-b" ido-switch-buffer nil :exit t)
-    ("C-i" other-window nil :exit t)
+    ;; ("C-i" other-window nil :exit t)
+    ("C-f" projectile-find-file nil :exit t)
+    ("C-p" persp-switch :exit t)
+
+    ;; other special buffers
     ("d" sd/project-or-dired-jump nil :exit t)
     ("b" ibuffer nil :exit t)
     ("e" sd/toggle-project-eshell nil :exit t)
     ("m" bookmark-jump-other-window nil :exit t)
     ("M" bookmark-set nil :exit t)
     ("g" magit-status nil :exit t)
-    ("p" persp-switch :exit t)
     ;; ("p" paradox-list-packages nil :exit t)
 
     ;; quit
index 4caf549..8767fd4 100644 (file)
@@ -4,24 +4,9 @@
 #+DATE: 2016-08-18
 
 * Programming Languages
-** gnuplog
-
-1. normal
-#+BEGIN_SRC gnuplot :exports code :file ./temp/sin.png
-  reset
-  plot sin(x)/x
-#+END_SRC
-
-#+RESULTS:
-[[file:./temp/sin.png]]
-
-2. plot with data file
-#+BEGIN_SRC 
-
-#+END_SRC
-
-
-* Perl One Line Command
+** Perl 
+*** One line command
+**** perl help
 #+BEGIN_SRC sh :exports both :results output replace
   perl --help
 #+END_SRC
@@ -63,24 +48,61 @@ Run 'perldoc perl' for more help with Perl.
 
 #+end_example
 
-1. Used as =grep=
+**** Used as =grep=
 #+BEGIN_SRC sh
   perl -ne 'print if /expression/' xxx.log;
 #+END_SRC
 
+#+BEGIN_SRC perl :results output replace
+  my $tt = "hello";
+  ($tt =~ /h(.*)o/ ) and print $1;
+#+END_SRC
+
+#+RESULTS:
+: ell
+
 Or 
 #+BEGIN_SRC sh
   perl -wnl -e '/keyword/ and print;' xxx.log
 #+END_SRC
 
-
-2. Used as =awk=
+**** Used as =awk=
 #+BEGIN_SRC sh
   perl -ne 'print "$1\n" if /aaa=(\d+)\s.*/' xxx.log;
 #+END_SRC
 
-3.
-#+BEGIN_SRC sh
-  perl -pe 'some code' < input.txt > output.txt
+** gnuplog
+
+1. normal
+#+BEGIN_SRC gnuplot :exports code :file ./temp/sin.png
+  reset
+  plot sin(x)/x
 #+END_SRC
 
+#+RESULTS:
+[[file:./temp/sin.png]]
+
+2. plot with data file
+#+BEGIN_SRC fundamental :tangle ./temp/plot.dat 
+  # x y
+  1 11
+  2 12
+  3 13
+  4 14
+  5 15
+  6 16
+  7 17
+  8 18
+  9 19
+#+END_SRC
+
+#+BEGIN_SRC gnuplot :file ./temp/ll.png
+  reset
+  set xrange [0:10]
+  set yrange [0:20]
+  plot "./temp/plot.dat" using 1:2 with lines
+#+END_SRC
+
+#+RESULTS:
+[[file:./temp/ll.png]]
+