SlideShare a Scribd company logo
1 of 43
Download to read offline
(add-hook 'find-file-hooks
  (lambda ()
    (cond (view-mode)
      (t
        (view-mode)))))
(defun toggle-view-mode ()
  (interactive)
  (cond (view-mode
       (view-mode nil)
       (setq hl-line-mode nil))
    (t
       (view-mode))))
(define-key global-map "C-xC-j" 'toggle-view-mode)
(define-key global-map "C-x j" 'toggle-view-mode)
(define-key global-map [C-backspace] 'toggle-view-mode)
(setq view-read-only t)
(defvar pager-keybind
      `( ;; vi-like
        ("h" . backward-word)
        ("l" . forward-word)
        ("j" . next-line)
        ("k" . previous-line)
        ("J" . next-window-line)
        ("K" . previous-window-line)
        ("b" . scroll-down)
        ("f" . scroll-up)
        (" " . scroll-up)
        ("w" . forward-word)
        ("e" . backward-word)
        ("n" . ,(lambda () (interactive) (scroll-up 1)))
        ("p" . ,(lambda () (interactive) (scroll-down 1)))
        ("[" . forward-sexp)
        ("]" . backward-sexp)
        ("." anything-c-moccur-occur-by-moccur)
        ("c" . scroll-other-window-down)
        ("v" . scroll-other-window)))
(defun define-many-keys (keymap key-table &optional includes)
  (let (key cmd)
    (dolist (key-cmd key-table)
      (setq key (car key-cmd)
            cmd (cdr key-cmd))
      (if (or (not includes) (member key includes))
        (define-key keymap key cmd))))keymap)
(key-chord-define-global "jk" 'toggle-view-mode)
(define-key global-map "C-xC-w" 'save-buffer)
(define-key global-map "C-x w" 'write-file)
(global-set-key "C-M-xC-w" 'save-buffer)




nmap <C-W><C-W>   :w<CR>
nmap <C-X><C-W>   :w!<CR>
20090622 Vimm4
20090622 Vimm4
20090622 Vimm4
20090622 Vimm4
20090622 Vimm4
20090622 Vimm4
20090622 Vimm4
20090622 Vimm4

More Related Content

What's hot

Program to sort the n names in an alphabetical order
Program to sort the n names in an alphabetical orderProgram to sort the n names in an alphabetical order
Program to sort the n names in an alphabetical orderSamsil Arefin
 
One dimensional operation of Array in C- language
One dimensional operation of Array in C- language One dimensional operation of Array in C- language
One dimensional operation of Array in C- language 9096308941
 
A gentle introduction to functional programming through music and clojure
A gentle introduction to functional programming through music and clojureA gentle introduction to functional programming through music and clojure
A gentle introduction to functional programming through music and clojurePaul Lam
 
cocos2d 事例編 HungryMasterの実装から
cocos2d 事例編 HungryMasterの実装からcocos2d 事例編 HungryMasterの実装から
cocos2d 事例編 HungryMasterの実装からYuichi Higuchi
 
Implementation of c string functions
Implementation of c string functionsImplementation of c string functions
Implementation of c string functionsmohamed sikander
 
Ejercicios
EjerciciosEjercicios
Ejerciciosleonharo
 
Class array
Class arrayClass array
Class arraynky92
 
Introduction to rust: a low-level language with high-level abstractions
Introduction to rust: a low-level language with high-level abstractionsIntroduction to rust: a low-level language with high-level abstractions
Introduction to rust: a low-level language with high-level abstractionsyann_s
 
刘平川:【用户行为分析】Marmot实践
刘平川:【用户行为分析】Marmot实践刘平川:【用户行为分析】Marmot实践
刘平川:【用户行为分析】Marmot实践taobao.com
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyYasuharu Nakano
 
From Javascript To Haskell
From Javascript To HaskellFrom Javascript To Haskell
From Javascript To Haskellujihisa
 

What's hot (20)

Bubble Sort
Bubble SortBubble Sort
Bubble Sort
 
Circular queue
Circular queueCircular queue
Circular queue
 
Snow
SnowSnow
Snow
 
Program to sort the n names in an alphabetical order
Program to sort the n names in an alphabetical orderProgram to sort the n names in an alphabetical order
Program to sort the n names in an alphabetical order
 
One dimensional operation of Array in C- language
One dimensional operation of Array in C- language One dimensional operation of Array in C- language
One dimensional operation of Array in C- language
 
A gentle introduction to functional programming through music and clojure
A gentle introduction to functional programming through music and clojureA gentle introduction to functional programming through music and clojure
A gentle introduction to functional programming through music and clojure
 
cocos2d 事例編 HungryMasterの実装から
cocos2d 事例編 HungryMasterの実装からcocos2d 事例編 HungryMasterの実装から
cocos2d 事例編 HungryMasterの実装から
 
Insertion sort
Insertion sortInsertion sort
Insertion sort
 
Implementation of c string functions
Implementation of c string functionsImplementation of c string functions
Implementation of c string functions
 
Snake.c
Snake.cSnake.c
Snake.c
 
Ejercicios
EjerciciosEjercicios
Ejercicios
 
Penjualan swalayan
Penjualan swalayanPenjualan swalayan
Penjualan swalayan
 
Class array
Class arrayClass array
Class array
 
Odd number
Odd numberOdd number
Odd number
 
Ruby haskell extension
Ruby haskell extensionRuby haskell extension
Ruby haskell extension
 
C questions
C questionsC questions
C questions
 
Introduction to rust: a low-level language with high-level abstractions
Introduction to rust: a low-level language with high-level abstractionsIntroduction to rust: a low-level language with high-level abstractions
Introduction to rust: a low-level language with high-level abstractions
 
刘平川:【用户行为分析】Marmot实践
刘平川:【用户行为分析】Marmot实践刘平川:【用户行为分析】Marmot实践
刘平川:【用户行为分析】Marmot实践
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovy
 
From Javascript To Haskell
From Javascript To HaskellFrom Javascript To Haskell
From Javascript To Haskell
 

Viewers also liked

Twitter クライアント “Termtter” の紹介と収集したソーシャルデータを Fluentd + Hadoop で分析する話
Twitter クライアント “Termtter” の紹介と収集したソーシャルデータを Fluentd + Hadoop で分析する話Twitter クライアント “Termtter” の紹介と収集したソーシャルデータを Fluentd + Hadoop で分析する話
Twitter クライアント “Termtter” の紹介と収集したソーシャルデータを Fluentd + Hadoop で分析する話id774
 
統計学における相関分析と仮説検定の基本的な考え方とその実践
統計学における相関分析と仮説検定の基本的な考え方とその実践統計学における相関分析と仮説検定の基本的な考え方とその実践
統計学における相関分析と仮説検定の基本的な考え方とその実践id774
 
はじめてのパターン認識勉強会 20130716
はじめてのパターン認識勉強会 20130716はじめてのパターン認識勉強会 20130716
はじめてのパターン認識勉強会 20130716Hiroko Onari
 
Rでソーシャルネットワーク分析
Rでソーシャルネットワーク分析Rでソーシャルネットワーク分析
Rでソーシャルネットワーク分析Hiroko Onari
 
Data scientist casual talk in 白金台
Data scientist casual talk in 白金台Data scientist casual talk in 白金台
Data scientist casual talk in 白金台Hiroko Onari
 
20080706_ecogeek_lt
20080706_ecogeek_lt20080706_ecogeek_lt
20080706_ecogeek_ltid774
 
Webシステムにおける自動分類器を利用した機械学習と顧客購買行動の予測
Webシステムにおける自動分類器を利用した機械学習と顧客購買行動の予測Webシステムにおける自動分類器を利用した機械学習と顧客購買行動の予測
Webシステムにおける自動分類器を利用した機械学習と顧客購買行動の予測id774net
 
20081220 Lt
20081220 Lt20081220 Lt
20081220 Ltid774
 
アルゴリズム取引のシステムを開発・運用してみて分かったこと
アルゴリズム取引のシステムを開発・運用してみて分かったことアルゴリズム取引のシステムを開発・運用してみて分かったこと
アルゴリズム取引のシステムを開発・運用してみて分かったことSatoshi KOBAYASHI
 

Viewers also liked (9)

Twitter クライアント “Termtter” の紹介と収集したソーシャルデータを Fluentd + Hadoop で分析する話
Twitter クライアント “Termtter” の紹介と収集したソーシャルデータを Fluentd + Hadoop で分析する話Twitter クライアント “Termtter” の紹介と収集したソーシャルデータを Fluentd + Hadoop で分析する話
Twitter クライアント “Termtter” の紹介と収集したソーシャルデータを Fluentd + Hadoop で分析する話
 
統計学における相関分析と仮説検定の基本的な考え方とその実践
統計学における相関分析と仮説検定の基本的な考え方とその実践統計学における相関分析と仮説検定の基本的な考え方とその実践
統計学における相関分析と仮説検定の基本的な考え方とその実践
 
はじめてのパターン認識勉強会 20130716
はじめてのパターン認識勉強会 20130716はじめてのパターン認識勉強会 20130716
はじめてのパターン認識勉強会 20130716
 
Rでソーシャルネットワーク分析
Rでソーシャルネットワーク分析Rでソーシャルネットワーク分析
Rでソーシャルネットワーク分析
 
Data scientist casual talk in 白金台
Data scientist casual talk in 白金台Data scientist casual talk in 白金台
Data scientist casual talk in 白金台
 
20080706_ecogeek_lt
20080706_ecogeek_lt20080706_ecogeek_lt
20080706_ecogeek_lt
 
Webシステムにおける自動分類器を利用した機械学習と顧客購買行動の予測
Webシステムにおける自動分類器を利用した機械学習と顧客購買行動の予測Webシステムにおける自動分類器を利用した機械学習と顧客購買行動の予測
Webシステムにおける自動分類器を利用した機械学習と顧客購買行動の予測
 
20081220 Lt
20081220 Lt20081220 Lt
20081220 Lt
 
アルゴリズム取引のシステムを開発・運用してみて分かったこと
アルゴリズム取引のシステムを開発・運用してみて分かったことアルゴリズム取引のシステムを開発・運用してみて分かったこと
アルゴリズム取引のシステムを開発・運用してみて分かったこと
 

Similar to 20090622 Vimm4

CL metaprogramming
CL metaprogrammingCL metaprogramming
CL metaprogrammingdudarev
 
Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기JangHyuk You
 
Clojure: Practical functional approach on JVM
Clojure: Practical functional approach on JVMClojure: Practical functional approach on JVM
Clojure: Practical functional approach on JVMsunng87
 
我在豆瓣使用Emacs
我在豆瓣使用Emacs我在豆瓣使用Emacs
我在豆瓣使用Emacs董 伟明
 
Meta-objective Lisp @名古屋 Reject 会議
Meta-objective Lisp @名古屋 Reject 会議Meta-objective Lisp @名古屋 Reject 会議
Meta-objective Lisp @名古屋 Reject 会議dico_leque
 
R (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support SystemR (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support SystemMaithreya Chakravarthula
 
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...confluent
 
Lisp Macros in 20 Minutes (Featuring Clojure)
Lisp Macros in 20 Minutes (Featuring Clojure)Lisp Macros in 20 Minutes (Featuring Clojure)
Lisp Macros in 20 Minutes (Featuring Clojure)Phil Calçado
 
(map Clojure everyday-tasks)
(map Clojure everyday-tasks)(map Clojure everyday-tasks)
(map Clojure everyday-tasks)Jacek Laskowski
 
ClojureScript loves React, DomCode May 26 2015
ClojureScript loves React, DomCode May 26 2015ClojureScript loves React, DomCode May 26 2015
ClojureScript loves React, DomCode May 26 2015Michiel Borkent
 
Transition graph using free monads and existentials
Transition graph using free monads and existentialsTransition graph using free monads and existentials
Transition graph using free monads and existentialsAlexander Granin
 
deepjs - tools for better programming
deepjs - tools for better programmingdeepjs - tools for better programming
deepjs - tools for better programmingnomocas
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Stream or not to Stream?

Stream or not to Stream?
Stream or not to Stream?

Stream or not to Stream?
Lukasz Byczynski
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1Ke Wei Louis
 

Similar to 20090622 Vimm4 (20)

CL metaprogramming
CL metaprogrammingCL metaprogramming
CL metaprogramming
 
Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기
 
Clojure: Practical functional approach on JVM
Clojure: Practical functional approach on JVMClojure: Practical functional approach on JVM
Clojure: Practical functional approach on JVM
 
我在豆瓣使用Emacs
我在豆瓣使用Emacs我在豆瓣使用Emacs
我在豆瓣使用Emacs
 
Meta-objective Lisp @名古屋 Reject 会議
Meta-objective Lisp @名古屋 Reject 会議Meta-objective Lisp @名古屋 Reject 会議
Meta-objective Lisp @名古屋 Reject 会議
 
R (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support SystemR (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support System
 
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
 
Lisp Macros in 20 Minutes (Featuring Clojure)
Lisp Macros in 20 Minutes (Featuring Clojure)Lisp Macros in 20 Minutes (Featuring Clojure)
Lisp Macros in 20 Minutes (Featuring Clojure)
 
Procesos
ProcesosProcesos
Procesos
 
(map Clojure everyday-tasks)
(map Clojure everyday-tasks)(map Clojure everyday-tasks)
(map Clojure everyday-tasks)
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
 
R meets Hadoop
R meets HadoopR meets Hadoop
R meets Hadoop
 
ClojureScript loves React, DomCode May 26 2015
ClojureScript loves React, DomCode May 26 2015ClojureScript loves React, DomCode May 26 2015
ClojureScript loves React, DomCode May 26 2015
 
Transition graph using free monads and existentials
Transition graph using free monads and existentialsTransition graph using free monads and existentials
Transition graph using free monads and existentials
 
deepjs - tools for better programming
deepjs - tools for better programmingdeepjs - tools for better programming
deepjs - tools for better programming
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Hw09 Hadoop + Clojure
Hw09   Hadoop + ClojureHw09   Hadoop + Clojure
Hw09 Hadoop + Clojure
 
Pune Clojure Course Outline
Pune Clojure Course OutlinePune Clojure Course Outline
Pune Clojure Course Outline
 
Stream or not to Stream?

Stream or not to Stream?
Stream or not to Stream?

Stream or not to Stream?

 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
 

20090622 Vimm4

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. (add-hook 'find-file-hooks (lambda () (cond (view-mode) (t (view-mode)))))
  • 32. (defun toggle-view-mode () (interactive) (cond (view-mode (view-mode nil) (setq hl-line-mode nil)) (t (view-mode)))) (define-key global-map "C-xC-j" 'toggle-view-mode) (define-key global-map "C-x j" 'toggle-view-mode) (define-key global-map [C-backspace] 'toggle-view-mode)
  • 33. (setq view-read-only t) (defvar pager-keybind `( ;; vi-like ("h" . backward-word) ("l" . forward-word) ("j" . next-line) ("k" . previous-line) ("J" . next-window-line) ("K" . previous-window-line) ("b" . scroll-down) ("f" . scroll-up) (" " . scroll-up) ("w" . forward-word) ("e" . backward-word) ("n" . ,(lambda () (interactive) (scroll-up 1))) ("p" . ,(lambda () (interactive) (scroll-down 1))) ("[" . forward-sexp) ("]" . backward-sexp) ("." anything-c-moccur-occur-by-moccur) ("c" . scroll-other-window-down) ("v" . scroll-other-window))) (defun define-many-keys (keymap key-table &optional includes) (let (key cmd) (dolist (key-cmd key-table) (setq key (car key-cmd) cmd (cdr key-cmd)) (if (or (not includes) (member key includes)) (define-key keymap key cmd))))keymap)
  • 35. (define-key global-map "C-xC-w" 'save-buffer) (define-key global-map "C-x w" 'write-file) (global-set-key "C-M-xC-w" 'save-buffer) nmap <C-W><C-W> :w<CR> nmap <C-X><C-W> :w!<CR>