SlideShare ist ein Scribd-Unternehmen logo
1 von 25
10      Vim


     mootoh
Emacs



• wb-line-number
 •   http://homepage1.nifty.com/blankspace/emacs/wb-line-number.html
Reading
 Vim
•               •   GUI


•               •   UI


•               •
•

    wc *.[ch] → 373,424
•   buffer.c    •   memline.c

•   edit.c      •   move.c

•   eval.c      •   normal.c

•   ex_cmds.h   •   ops.c
    •   ex
                •   search.c

•   ex_+.c      •   undo.c

    •   ex      •   structs.h:
                    •
•   getchar.c

•   main.c      •   vim.h

•   mark.c

•   memfile.c
•   diff.c            •   misc?.c

•   feature.h         •   option.[ch]

    •   WITH_FEATUE   •   proto.h


•   fileio.c              •
•   fold.c            •   quickfix.c

•   globals.h         •   regexp.[ch]

    •                 •   tag.c


•   hardcopy.c        •   version.[ch]


•   hashtab.c         •   vimio.h


•   keymap.h

•   macros.h

•   message.c
• arabic.[ch]   • farsi.[ch]
• ascii.h       • hangulin.c
• charset.c     • mbyte.c
• digraph.c
 •
•   os_*                •   NetBeans

•   DOS                     •   nbdebug.[ch]

    •   dosinst.[ch]        •   netbeans.c

    •   uninstal.c      •   Sun Visual Workshop

•   Windows                 •   integration.[ch]

    •   dlldata.c           •   workshop.[ch]

    •   glbl_ime.h          •   wsdebug.[ch]

    •   iid_ole.c       •
    •   vimrun.c
                            •   term.[ch]
    •   vimtbar.h
                            •   termlib.c
    •   xpsm_w32.[ch]
                            •   pty.c
• GUI           • UI
 • gui_*         • screen.c
 • menu.c        • ui.c
 • popupmnu.c    • window.c

                •
                    • if_*
•
    • Just Single Directory
    •
      • : undo.c
•
    • misc1.c, misc2.c...
a
• GDB attach
  • CFLAGS = ‘-O0 -g’
•                       b

•
b normal.c:8692
nv_edit


• normal.c: L8692
    •   Handle "A", "a", "I", "i" and <Insert> commands.

•                               invoke_edit()
invoke_edit

• normal.c: L8792
•                   edit()

• edit
edit

• edit.c : L299
•
• ESC
fmfm
•             ?

• backtrace
bt
(gdb) bt

#0   nv_edit (cap=0xbffff9a0) at normal.c:8696

#1   0x000cc9a0 in normal_cmd (oap=0xbffffa50, toplevel=1)

               at normal.c:1152

#2   0x0009202c in main_loop (cmdwin=0, noexmode=0) at main.c:1181

#3   0x00091c43 in main (argc=2, argv=0xbffffbe4) at main.c:940

(gdb) fr 1

#1   0x000cc9a0 in normal_cmd (oap=0xbffffa50, toplevel=1)

               at normal.c:1152

1152         (nv_cmds[idx].cmd_func)(&ca);
• normal.c : L220
• nv_cmds:
 •
• normal.c: L512: find_command
 •
!
• Vim
• ‘a’
  •
•       undo ?

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (14)

Rubigraph
RubigraphRubigraph
Rubigraph
 
並カン (CM カット版)
並カン (CM カット版)並カン (CM カット版)
並カン (CM カット版)
 
12.05.2009 Olv Climic
12.05.2009   Olv Climic12.05.2009   Olv Climic
12.05.2009 Olv Climic
 
Why You Should be a RubiKaigi Staff
Why You Should be a RubiKaigi StaffWhy You Should be a RubiKaigi Staff
Why You Should be a RubiKaigi Staff
 
Rurimaphone
RurimaphoneRurimaphone
Rurimaphone
 
Galabnik
GalabnikGalabnik
Galabnik
 
Soc 02 Betz Katelyn
Soc 02 Betz KatelynSoc 02 Betz Katelyn
Soc 02 Betz Katelyn
 
pureprofile - PR capabilities
pureprofile - PR capabilitiespureprofile - PR capabilities
pureprofile - PR capabilities
 
近未来的並列 LL
近未来的並列 LL近未来的並列 LL
近未来的並列 LL
 
本の読み方 T Onoda
本の読み方 T Onoda本の読み方 T Onoda
本の読み方 T Onoda
 
Ruby Kaigi 2008 LT
Ruby Kaigi 2008 LTRuby Kaigi 2008 LT
Ruby Kaigi 2008 LT
 
Elearning at NWIC
Elearning at NWICElearning at NWIC
Elearning at NWIC
 
Tecnalia apd logroño 2016
Tecnalia apd logroño 2016Tecnalia apd logroño 2016
Tecnalia apd logroño 2016
 
ngCore
ngCorengCore
ngCore
 

Ähnlich wie Vim M #1

Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Rhio Kim
 
OSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy HawkinsOSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy HawkinsNETWAYS
 
Programming in Linux Environment
Programming in Linux EnvironmentProgramming in Linux Environment
Programming in Linux EnvironmentDongho Kang
 
2018 PyCon Korea - Ring
2018 PyCon Korea - Ring2018 PyCon Korea - Ring
2018 PyCon Korea - RingYunWon Jeong
 
下吧开发总结
下吧开发总结下吧开发总结
下吧开发总结Night Sailer
 
MongoDB开发应用实践
MongoDB开发应用实践MongoDB开发应用实践
MongoDB开发应用实践iammutex
 
Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.Mandi Walls
 
CPAN 模組二三事
CPAN 模組二三事CPAN 模組二三事
CPAN 模組二三事Lin Yo-An
 
视觉中国的MongoDB应用实践(QConBeijing2011)
视觉中国的MongoDB应用实践(QConBeijing2011)视觉中国的MongoDB应用实践(QConBeijing2011)
视觉中国的MongoDB应用实践(QConBeijing2011)Night Sailer
 
Memcached Code Camp 2009
Memcached Code Camp 2009Memcached Code Camp 2009
Memcached Code Camp 2009NorthScale
 
Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Mandi Walls
 
龍華大學前端技術分享 Part1
龍華大學前端技術分享 Part1龍華大學前端技術分享 Part1
龍華大學前端技術分享 Part1Jia-Long Yeh
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
平台开发须知
平台开发须知平台开发须知
平台开发须知Vonbo
 
Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Kevin Munc
 

Ähnlich wie Vim M #1 (20)

Vim - Amazing Editor for DBAs
Vim - Amazing Editor for DBAsVim - Amazing Editor for DBAs
Vim - Amazing Editor for DBAs
 
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
 
Gashuku Presen
Gashuku PresenGashuku Presen
Gashuku Presen
 
Gashuku Presen
Gashuku PresenGashuku Presen
Gashuku Presen
 
OSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy HawkinsOSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy Hawkins
 
Programming in Linux Environment
Programming in Linux EnvironmentProgramming in Linux Environment
Programming in Linux Environment
 
2018 PyCon Korea - Ring
2018 PyCon Korea - Ring2018 PyCon Korea - Ring
2018 PyCon Korea - Ring
 
下吧开发总结
下吧开发总结下吧开发总结
下吧开发总结
 
MongoDB开发应用实践
MongoDB开发应用实践MongoDB开发应用实践
MongoDB开发应用实践
 
Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
Updated non-lab version of Level Up. Delivered at LOPSA-East, May 3, 2014.
 
CPAN 模組二三事
CPAN 模組二三事CPAN 模組二三事
CPAN 模組二三事
 
视觉中国的MongoDB应用实践(QConBeijing2011)
视觉中国的MongoDB应用实践(QConBeijing2011)视觉中国的MongoDB应用实践(QConBeijing2011)
视觉中国的MongoDB应用实践(QConBeijing2011)
 
Memcached Code Camp 2009
Memcached Code Camp 2009Memcached Code Camp 2009
Memcached Code Camp 2009
 
Web2.0 with jQuery in English
Web2.0 with jQuery in EnglishWeb2.0 with jQuery in English
Web2.0 with jQuery in English
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014
 
龍華大學前端技術分享 Part1
龍華大學前端技術分享 Part1龍華大學前端技術分享 Part1
龍華大學前端技術分享 Part1
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
平台开发须知
平台开发须知平台开发须知
平台开发须知
 
Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013
 

Vim M #1

  • 1. 10 Vim mootoh
  • 2.
  • 3.
  • 4. Emacs • wb-line-number • http://homepage1.nifty.com/blankspace/emacs/wb-line-number.html
  • 5.
  • 7. • GUI • • UI • • • wc *.[ch] → 373,424
  • 8. buffer.c • memline.c • edit.c • move.c • eval.c • normal.c • ex_cmds.h • ops.c • ex • search.c • ex_+.c • undo.c • ex • structs.h: • • getchar.c • main.c • vim.h • mark.c • memfile.c
  • 9. diff.c • misc?.c • feature.h • option.[ch] • WITH_FEATUE • proto.h • fileio.c • • fold.c • quickfix.c • globals.h • regexp.[ch] • • tag.c • hardcopy.c • version.[ch] • hashtab.c • vimio.h • keymap.h • macros.h • message.c
  • 10. • arabic.[ch] • farsi.[ch] • ascii.h • hangulin.c • charset.c • mbyte.c • digraph.c •
  • 11. os_* • NetBeans • DOS • nbdebug.[ch] • dosinst.[ch] • netbeans.c • uninstal.c • Sun Visual Workshop • Windows • integration.[ch] • dlldata.c • workshop.[ch] • glbl_ime.h • wsdebug.[ch] • iid_ole.c • • vimrun.c • term.[ch] • vimtbar.h • termlib.c • xpsm_w32.[ch] • pty.c
  • 12. • GUI • UI • gui_* • screen.c • menu.c • ui.c • popupmnu.c • window.c • • if_*
  • 13. • Just Single Directory • • : undo.c • • misc1.c, misc2.c...
  • 14. a
  • 15. • GDB attach • CFLAGS = ‘-O0 -g’ • b •
  • 17. nv_edit • normal.c: L8692 • Handle "A", "a", "I", "i" and <Insert> commands. • invoke_edit()
  • 19. edit • edit.c : L299 • • ESC
  • 20. fmfm
  • 21. ? • backtrace
  • 22. bt (gdb) bt #0 nv_edit (cap=0xbffff9a0) at normal.c:8696 #1 0x000cc9a0 in normal_cmd (oap=0xbffffa50, toplevel=1) at normal.c:1152 #2 0x0009202c in main_loop (cmdwin=0, noexmode=0) at main.c:1181 #3 0x00091c43 in main (argc=2, argv=0xbffffbe4) at main.c:940 (gdb) fr 1 #1 0x000cc9a0 in normal_cmd (oap=0xbffffa50, toplevel=1) at normal.c:1152 1152 (nv_cmds[idx].cmd_func)(&ca);
  • 23. • normal.c : L220 • nv_cmds: • • normal.c: L512: find_command •
  • 24. !
  • 25. • Vim • ‘a’ • • undo ?