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

List:       kwrite-devel
Subject:    Re: Review Request 115443: Added a "Relative line numbers" option.
From:       "Matthew Woehlke" <mw_triad () users ! sourceforge ! net>
Date:       2014-03-05 19:09:38
Message-ID: 20140305190938.30951.44714 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On March 5, 2014, 12:10 p.m., Michal Humpula wrote:
> > Love it. Just a few micro-issues.
> > 
> > We don't have to stick with precise Vim functionality, so what are you saying about \
> > prefixing the numbers before current line with minus sign? Do you think it would make more \
> > sense? In vim case it would waste one terminal column, but in kate it's few pixels. 
> > Hate the checkbox, we realy need the ":set numbers" like functionality in kate. But for now \
> > it will have to do. 
> > Don't like another vi-mode specific switch in kateview. In long term I would like to cut \
> > out vi-mode specific code from the rest of the codebase as much as possible. But that's for \
> > KF5. So go ahead with this. Let's see what will happen in KF5 at the end. 
> > I agree that for non-vi-mode users this feature doesn't make much sense, so putting it to \
> > vi-mode only makes sense. 
> > Since everything I've described is optional, I'm giving the ship it.
> 
> Miquel Sabaté Solà wrote:
> I don't like the minus sign idea. My way of thinking is "2 lines above", not "-2 lines". I \
> guess that I'm too used to how vim handles this :) And for mere aesthetics, I also prefer \
> vim's way :P 
> I agree with the rest of your comment.

You could always use e.g. 2↑ 2↓ instead :-). We also are more able to assume a decent \
unicode font.


- Matthew


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115443/#review52103
-----------------------------------------------------------


On March 5, 2014, 1:50 p.m., Miquel Sabaté Solà wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115443/
> -----------------------------------------------------------
> 
> (Updated March 5, 2014, 1:50 p.m.)
> 
> 
> Review request for Kate.
> 
> 
> Repository: kate
> 
> 
> Description
> -------
> 
> Ok, here it goes a "crazy" idea :) In vim there's the "relativenumber" option. In short, this \
> means that in the left border we no longer have absolute line numbers but line numbers \
> relative to the current cursor (see the "relative.png" attachment). This is useful since in \
> vim all commands accept an optional number (that is relative to the current cursor). This \
> feature is, of course, configurable and set to false by default. Moreover since this is a \
> feature that, in my opinion, only makes sense in vim, I've added this option under the "Vi \
> Input Mode" tab in the configuration (see the "relative1.png" attachment). 
> This is cool and everything, but it's not fully working yet :( We don't want to be updating \
> the left border all the time (otherwise the CPU usage goes kind of crazy, 20% more or less \
> with KWrite). I'm only updating the left border when the user moves up or down. However, in \
> some situations the line numbering does not update. An example of this is opening a large \
> file, going in the middle of the file and then starting to move up and down. For some reason \
> in this situation the left border is not updated. Since I'm kind of new to the KateView code, \
> I'd like to hear suggestions and tips so we can fix this issue :P 
> Thanks for your time :) !
> 
> 
> Diffs
> -----
> 
> part/dialogs/katedialogs.cpp 4de0628 
> part/dialogs/viinputmodeconfigwidget.ui 29a5257 
> part/utils/kateconfig.h d5f085b 
> part/utils/kateconfig.cpp 20c4494 
> part/view/kateview.h fc15b94 
> part/view/kateview.cpp f5c8d6f 
> part/view/kateviewhelpers.h 7f76ed3 
> part/view/kateviewhelpers.cpp 80eebb67 
> part/view/kateviewinternal.h 5d7c2f4 
> part/view/kateviewinternal.cpp 505cb93 
> 
> Diff: https://git.reviewboard.kde.org/r/115443/diff/
> 
> 
> Testing
> -------
> 
> Manual testing. It's not working properly yet, take a look at the "Description" section \
> above. 
> 
> File Attachments
> ----------------
> 
> A snapshot
> https://git.reviewboard.kde.org/media/uploaded/files/2014/02/03/09554ab4-fc68-4044-8629-3aa6c65e0f10__relative.png
>  Option
> https://git.reviewboard.kde.org/media/uploaded/files/2014/02/03/88e089f9-a3ab-4622-b9a0-d017ab57b349__relative1.png
>  
> 
> Thanks,
> 
> Miquel Sabaté Solà 
> 
> 


[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="https://git.reviewboard.kde.org/r/115443/">https://git.reviewboard.kde.org/r/115443/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On March 5th, 2014, 12:10 p.m. EST, <b>Michal Humpula</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;">Love it. Just a few micro-issues.

We don&#39;t have to stick with precise Vim functionality, so what are you saying about \
prefixing the numbers before current line with minus sign? Do you think it would make more \
sense? In vim case it would waste one terminal column, but in kate it&#39;s few pixels.

Hate the checkbox, we realy need the &quot;:set numbers&quot; like functionality in kate. But \
for now it will have to do.

Don&#39;t like another vi-mode specific switch in kateview. In long term I would like to cut \
out vi-mode specific code from the rest of the codebase as much as possible. But that&#39;s for \
KF5. So go ahead with this. Let&#39;s see what will happen in KF5 at the end.

I agree that for non-vi-mode users this feature doesn&#39;t make much sense, so putting it to \
vi-mode only makes sense.

Since everything I&#39;ve described is optional, I&#39;m giving the ship it.</pre>
 </blockquote>




 <p>On March 5th, 2014, 1:37 p.m. EST, <b>Miquel Sabaté Solà </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;">I don&#39;t like the minus sign idea. My way \
of thinking is &quot;2 lines above&quot;, not &quot;-2 lines&quot;. I guess that I&#39;m too \
used to how vim handles this :) And for mere aesthetics, I also prefer vim&#39;s way :P

I agree with the rest of your comment.</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;">You could always use e.g. 2↑ 2↓ instead \
:-). We also are more able to assume a decent unicode font.</pre> <br />










<p>- Matthew</p>


<br />
<p>On March 5th, 2014, 1:50 p.m. EST, Miquel Sabaté Solà wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('https://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 Miquel Sabaté Solà .</div>


<p style="color: grey;"><i>Updated March 5, 2014, 1:50 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>


<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;">Ok, here it goes a \
&quot;crazy&quot; idea :) In vim there&#39;s the &quot;relativenumber&quot; option. In short, \
this means that in the left border we no longer have absolute line numbers but line numbers \
relative to the current cursor (see the &quot;relative.png&quot; attachment). This is useful \
since in vim all commands accept an optional number (that is relative to the current cursor). \
This feature is, of course, configurable and set to false by default. Moreover since this is a \
feature that, in my opinion, only makes sense in vim, I&#39;ve added this option under the \
&quot;Vi Input Mode&quot; tab in the configuration (see the &quot;relative1.png&quot; \
attachment).

This is cool and everything, but it&#39;s not fully working yet :( We don&#39;t want to be \
updating the left border all the time (otherwise the CPU usage goes kind of crazy, 20% more or \
less with KWrite). I&#39;m only updating the left border when the user moves up or down. \
However, in some situations the line numbering does not update. An example of this is opening a \
large file, going in the middle of the file and then starting to move up and down. For some \
reason in this situation the left border is not updated. Since I&#39;m kind of new to the \
KateView code, I&#39;d like to hear suggestions and tips so we can fix this issue :P

Thanks for your time :) !</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;">Manual testing. \
It&#39;s not working properly yet, take a look at the &quot;Description&quot; section \
above.</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/dialogs/katedialogs.cpp <span style="color: grey">(4de0628)</span></li>

 <li>part/dialogs/viinputmodeconfigwidget.ui <span style="color: grey">(29a5257)</span></li>

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

 <li>part/utils/kateconfig.cpp <span style="color: grey">(20c4494)</span></li>

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

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

 <li>part/view/kateviewhelpers.h <span style="color: grey">(7f76ed3)</span></li>

 <li>part/view/kateviewhelpers.cpp <span style="color: grey">(80eebb67)</span></li>

 <li>part/view/kateviewinternal.h <span style="color: grey">(5d7c2f4)</span></li>

 <li>part/view/kateviewinternal.cpp <span style="color: grey">(505cb93)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/115443/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="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/03/09554ab4-fc68-4044-8629-3aa6c65e0f10__relative.png">A \
snapshot</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/03/88e089f9-a3ab-4622-b9a0-d017ab57b349__relative1.png">Option</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