[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Review Request 109867: Optional Emulated Command Bar for Vim (searching only so far)
From:       "Simon St James" <kdedevel () etotheipiplusone ! com>
Date:       2013-04-06 9:03:28
Message-ID: 20130406090328.28828.25573 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On April 5, 2013, 10:04 p.m., Christoph Cullmann wrote:
> > Hi,
> > 
> > I think this approach is the way to go for the vi search/replace stuff.
> > If that allows to cleanup the search bar again a bit from the vi specific bits \
> > and you have unit tests in place (like it looks) that is a good idea. 
> > (sorry, I just seen that request, I moved the tests to toplevel tests and cleaned \
> > up a bit, guess you need to adjust for that) 
> > One thing: I think the vi mode docs need some real massive update then ;)

Cool; committed.  The moving of the tests was no problem: git handled all the for me \
:)

I'll be sure to update the docs when this is all done :)


-  Simon


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109867/#review30529
-----------------------------------------------------------


On April 6, 2013, 8:57 a.m., Simon St James wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109867/
> -----------------------------------------------------------
> 
> (Updated April 6, 2013, 8:57 a.m.)
> 
> 
> Review request for Kate.
> 
> 
> Description
> -------
> 
> A bit of a monster, I'm afraid ;)
> 
> As I mentioned on my blog \
> (http://kate-editor.org/2013/03/16/kate-vim-mode-papercuts-bonus-emscripten-qt-stuff/) \
> I'm not really a fan of the current integration of Vim with Kate's built in Find/ \
> Replace dialog, so I started working on a more Vim-ish replacement.  Here is the \
> initial stab at it - there's still plenty of work to do, but searching with "/" and \
> "?" already works better than before, plus we have shortcuts like ctrl-r, etc. 
> Currently, it's off by default, and switched on by a (hidden) config option: \
> *ideally*, I'd like to make it the default and only choice (and then clean some of \
> the Vim-specific stuff out of the Kate Find/ Replace dialog), but I'd like to blog \
> and get some feedback, first. 
> The advantages of this patch are:
> 
> a) Less buggy interaction of searches with "n" and "N" (case-insensitivity in \
> particular); b) More Vim-style shortcuts: dismiss via ctrl-c, ctrl-[ etc; backspace \
> via ctrl-h & dismiss via ctrl-h when empty; ctrl-r for insertion of register \
> contents/ word under cursor in document; etc. c) More Vim-ish cursor placement - \
> the cursor always stays at the first character of the match; d) The total match so \
> far is highlighted, as in Vim (dismissed when the bar is closed). Search is \
> SmartCase, incremental, and wraps around; e) Can be used from mappings;
> f) Can be used with the (eventual!) Vim macro implementation.
> 
> Still a lot of fine-tuning left, but it would be nice to get this committed before \
> doing so.  Some plans: 
> a) Get ctrl-w to work right: it's currently really stupid;
> b) Eventually get the bar to replace ":" - this will be great for extensibility, as \
> the fact that it works with mappings means that we'll be able to trigger complex \
> Javascript expressions with a couple of keypresses; c) Go through history with \
> ctrl-n/ ctrl-p : I'm going to extend Vim's implementation and make it \
> context-sensitive, so if we do a ":s/blah/something/ and the cursor is on "blah", \
> then we'll move through the history of search terms; if on "something", we'll go \
> through the history of replace terms; etc.  Usage of "*" and "#" will of course add \
> to the history; b) A few more extensions: toggle regex vs literal with some \
> shortcut; delete and place cursor at "blah" and "something" in the above with \
> shortcut(s); etc d) Vim-style interactive search and replace;
> e) Escape the search term to be more in line with Vim's ("(" and ")" should be \
> treated as literals, for example, not regex commands); f) ... and a bunch of other \
> stuff ;) 
> After that, it will be on to macro support!
> 
> 
> Diffs
> -----
> 
> part/CMakeLists.txt 5db7fd257c176fac4488ce98f633b2d6fc64eb28 
> part/tests/vimode_test.h 83dc208a9ecf44b56704e596eaa127d636a89e8d 
> part/tests/vimode_test.cpp d9747865d72f85a741ac55e245a9ba1d5434d03a 
> part/utils/kateconfig.h 5b4abffb596c9f46e5333fb5bd19406427d411e3 
> part/utils/kateconfig.cpp 4342be50ae9e60a264aac712a1c6deec20cddcb5 
> part/view/kateview.h 246cfb71a7061db577d4a33f4ca42ac2c94c2429 
> part/view/kateview.cpp 70ea1183d188c8387b0b4100490f935852f977c3 
> part/vimode/kateviemulatedcommandbar.h PRE-CREATION 
> part/vimode/kateviemulatedcommandbar.cpp PRE-CREATION 
> part/vimode/kateviinputmodemanager.h e61399e4d475bafbca7f208b72b19946e6771b1e 
> part/vimode/kateviinputmodemanager.cpp 51ca1792b7070ef979cf75038c04b48f5dc4e510 
> part/vimode/katevimodebase.h fbffe9d53d9f26315f60b69fc771b5ee43fbf340 
> part/vimode/katevimodebase.cpp 85d464f2622105458fb20b3a671b223b694110f4 
> part/vimode/katevinormalmode.cpp b7a38ea9b7cd92e8e15e9494675e419574bea06c 
> 
> Diff: http://git.reviewboard.kde.org/r/109867/diff/
> 
> 
> Testing
> -------
> 
> Some dogfooding, and an extensive battery of automated tests.
> 
> 
> File Attachments
> ----------------
> 
> Screenshot
> http://git.reviewboard.kde.org/media/uploaded/files/2013/04/05/kate-vim-emulated-command-bar.png
>  
> 
> Thanks,
> 
> Simon St James
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/109867/">http://git.reviewboard.kde.org/r/109867/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On April 5th, 2013, 10:04 p.m. UTC, <b>Christoph \
Cullmann</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Hi,

I think this approach is the way to go for the vi search/replace stuff.
If that allows to cleanup the search bar again a bit from the vi specific bits and \
you have unit tests in place (like it looks) that is a good idea.

(sorry, I just seen that request, I moved the tests to toplevel tests and cleaned up \
a bit, guess you need to adjust for that)

One thing: I think the vi mode docs need some real massive update then ;)</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Cool; committed.  The \
moving of the tests was no problem: git handled all the for me :)

I&#39;ll be sure to update the docs when this is all done :)</pre>
<br />










<p>-  Simon</p>


<br />
<p>On April 6th, 2013, 8:57 a.m. UTC, Simon St James wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Kate.</div>
<div>By Simon St James.</div>


<p style="color: grey;"><i>Updated April 6, 2013, 8:57 a.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">A bit of a monster, I&#39;m afraid ;)

As I mentioned on my blog \
(http://kate-editor.org/2013/03/16/kate-vim-mode-papercuts-bonus-emscripten-qt-stuff/) \
I&#39;m not really a fan of the current integration of Vim with Kate&#39;s built in \
Find/ Replace dialog, so I started working on a more Vim-ish replacement.  Here is \
the initial stab at it - there&#39;s still plenty of work to do, but searching with \
&quot;/&quot; and &quot;?&quot; already works better than before, plus we have \
shortcuts like ctrl-r, etc.

Currently, it&#39;s off by default, and switched on by a (hidden) config option: \
*ideally*, I&#39;d like to make it the default and only choice (and then clean some \
of the Vim-specific stuff out of the Kate Find/ Replace dialog), but I&#39;d like to \
blog and get some feedback, first.

The advantages of this patch are:

a) Less buggy interaction of searches with &quot;n&quot; and &quot;N&quot; \
(case-insensitivity in particular); b) More Vim-style shortcuts: dismiss via ctrl-c, \
ctrl-[ etc; backspace via ctrl-h &amp; dismiss via ctrl-h when empty; ctrl-r for \
insertion of register contents/ word under cursor in document; etc. c) More Vim-ish \
cursor placement - the cursor always stays at the first character of the match; d) \
The total match so far is highlighted, as in Vim (dismissed when the bar is closed). \
Search is SmartCase, incremental, and wraps around; e) Can be used from mappings;
f) Can be used with the (eventual!) Vim macro implementation.

Still a lot of fine-tuning left, but it would be nice to get this committed before \
doing so.  Some plans:

a) Get ctrl-w to work right: it&#39;s currently really stupid;
b) Eventually get the bar to replace &quot;:&quot; - this will be great for \
extensibility, as the fact that it works with mappings means that we&#39;ll be able \
to trigger complex Javascript expressions with a couple of keypresses; c) Go through \
history with ctrl-n/ ctrl-p : I&#39;m going to extend Vim&#39;s implementation and \
make it context-sensitive, so if we do a &quot;:s/blah/something/ and the cursor is \
on &quot;blah&quot;, then we&#39;ll move through the history of search terms; if on \
&quot;something&quot;, we&#39;ll go through the history of replace terms; etc.  Usage \
of &quot;*&quot; and &quot;#&quot; will of course add to the history; b) A few more \
extensions: toggle regex vs literal with some shortcut; delete and place cursor at \
&quot;blah&quot; and &quot;something&quot; in the above with shortcut(s); etc d) \
Vim-style interactive search and replace; e) Escape the search term to be more in \
line with Vim&#39;s (&quot;(&quot; and &quot;)&quot; should be treated as literals, \
for example, not regex commands); f) ... and a bunch of other stuff ;)

After that, it will be on to macro support!

</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Some dogfooding, and an extensive battery of automated tests.</pre>  \
</td>  </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>part/CMakeLists.txt <span style="color: \
grey">(5db7fd257c176fac4488ce98f633b2d6fc64eb28)</span></li>

 <li>part/tests/vimode_test.h <span style="color: \
grey">(83dc208a9ecf44b56704e596eaa127d636a89e8d)</span></li>

 <li>part/tests/vimode_test.cpp <span style="color: \
grey">(d9747865d72f85a741ac55e245a9ba1d5434d03a)</span></li>

 <li>part/utils/kateconfig.h <span style="color: \
grey">(5b4abffb596c9f46e5333fb5bd19406427d411e3)</span></li>

 <li>part/utils/kateconfig.cpp <span style="color: \
grey">(4342be50ae9e60a264aac712a1c6deec20cddcb5)</span></li>

 <li>part/view/kateview.h <span style="color: \
grey">(246cfb71a7061db577d4a33f4ca42ac2c94c2429)</span></li>

 <li>part/view/kateview.cpp <span style="color: \
grey">(70ea1183d188c8387b0b4100490f935852f977c3)</span></li>

 <li>part/vimode/kateviemulatedcommandbar.h <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>part/vimode/kateviemulatedcommandbar.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>part/vimode/kateviinputmodemanager.h <span style="color: \
grey">(e61399e4d475bafbca7f208b72b19946e6771b1e)</span></li>

 <li>part/vimode/kateviinputmodemanager.cpp <span style="color: \
grey">(51ca1792b7070ef979cf75038c04b48f5dc4e510)</span></li>

 <li>part/vimode/katevimodebase.h <span style="color: \
grey">(fbffe9d53d9f26315f60b69fc771b5ee43fbf340)</span></li>

 <li>part/vimode/katevimodebase.cpp <span style="color: \
grey">(85d464f2622105458fb20b3a671b223b694110f4)</span></li>

 <li>part/vimode/katevinormalmode.cpp <span style="color: \
grey">(b7a38ea9b7cd92e8e15e9494675e419574bea06c)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/109867/diff/" style="margin-left: \
3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>

<ul>

 <li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/04/05/kate-vim-emulated-command-bar.png">Screenshot</a></li>


</ul>





  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic