lecture 2 vim s giant flaw
play

Lecture 2: Vim's Giant Flaw Part I Recurring Themes Annoucements - PowerPoint PPT Presentation

Lecture 2: Vim's Giant Flaw Part I Recurring Themes Annoucements Homework 1 will be out by tonight! Covers everything up to and including this lecture. No commands will be covered (as usual), we will get to that in the second part of


  1. Fuzzy is Good? • Note that this is NOT an ambiguous command! • hlsearch. • /cau<CR> uniquely identifies 'cause' as the word you want to edit.

  2. Fuzzy is Good? • But if we are lazy: /ca<CR> • it would be ambiguous! (demo hlsearch) • Question: What could go wrong?

  3. Fuzzy is Good?

  4. Fuzzy is Good?

  5. Fuzzy is Good? goto for loop

  6. Fuzzy is Good? goto for loop /for<CR> What could go wrong?

  7. Fuzzy is Good? goto for loop /for<CR> What could go wrong? Code has repetition!

  8. Fuzzy is Good? From Vim's Perspective

  9. Fuzzy is Good? From Vim's Perspective

  10. Fuzzy is Good?

  11. Fuzzy is Good? I want to locate that for loop

  12. Fuzzy is Good? Which for loop????

  13. Fuzzy is Good? Which for loop????

  14. Fuzzy is Good? Which for loop???? Ambiguity!!

  15. Fuzzy is Good? Which for loop???? Ambiguity!! There is more than one way to interpret a description.

  16. Fuzzy is Good? Which for loop???? Ambiguity!! There is more than one way to interpret a description.

  17. Conventions (from last time) • We have three emphasis on commands for this course: 1. Clarity (no ambiguity!) 2. Ergonomics 3. Keystrokes

  18. Conventions (from last time) • We have three emphasis on commands for this course: 1. Clarity (no ambiguity!) 2. Ergonomics 3. Keystrokes So how do we deal with it?

  19. • A few loose ends... • Ambiguity • Ways to resolve it

  20. Resolving Ambiguity (In decreasing use case): 1. Cheating 2. Distinctive features 3. Relative jumps

  21. Cheating Well, it's one of them...

  22. Cheating Well, it's one of them... Keep trying until you get to it!!

  23. Cheating Emphasizing the idea that: "Well, my description is somewhat clear... So there wouldn't be that much ambiguity!"

  24. Cheating • By default, /<pattern><CR> command finds the next closest match.

  25. Cheating • By default, /<pattern><CR> command finds the next closest match. n • Finds the next match N • Finds the previous match

  26. Cheating • Note: most of the time, we cheat because Vim matches things that we don't expect/know. (or we are unfamilar with the language) • Demo (trouble.cpp)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend