Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text selection with keys/ goto-line statement/colorscheme #582

Closed
solyarisoftware opened this issue Mar 4, 2017 · 8 comments
Closed

text selection with keys/ goto-line statement/colorscheme #582

solyarisoftware opened this issue Mar 4, 2017 · 8 comments

Comments

@solyarisoftware
Copy link

solyarisoftware commented Mar 4, 2017

Hi,

premise:
micro is smart and I love coinciseness & simplicity.

I'd like to spread it for people not practice with vim (I use it by default) for writing dialogs in ChatScript (soon I'll submit syntax file proposal).

I have one (minor) problem, a feature request and a minor proposal.

1. the problem: text selection with keys (without mouse)

Mouse support appears great, and that's perfect for people used to edit on windows environments (not the cli), nevertheless, myself, I almost do not use the mouse,

reading here: https://github.com/zyedidia/micro/blob/master/runtime/help/keybindings.md#default-keybinding-configuration it seems to me that I could select a block of chars with something like, for example;

"ShiftLeft":      "SelectLeft",
"ShiftRight":     "SelectRight",

But I do not have success (nothing happens if I press SHIFT+RIGHT)...
All in all my question is:
can I select a block of text to copy/delete, just using keyboards shortcuts (without using mouse)?

Specifications

Commit hash:

$ m -version
Version: 1.1.4
Commit hash: 5dc8fe4
Compiled on February 10, 2017

OS:
linux ubuntu 14.04

Terminal:
ssh via putty

2. the feature request: goto-line statement!

Reading documentation here:
https://github.com/zyedidia/micro/tree/master/runtime/help

it seems to me that there is no a GOTO LINE command, like

:23

in vim (to go to line 23)

and from command line option (great for automatize developement/debug of errors) like vim:

vi +23 micro_is_great.rb

Any will to implement that?

3. monokay colorscheme mod proposal

Default colorschemes are all pretty! Nevertheless I feel a bit ugly color in status line for monokay colorscheme. I'd suggest:

 color-link statusline "#AAAAAA,#323232"

I know, you allow customs and I did my own:
https://gist.github.com/solyaris/464051254e5e952ac5332d50e93cfe2a

minor minor point :-)

thanks (for your patience too).
giorgio

@GeigerCounter
Copy link
Contributor

@Solyaris Thank you for opening an issue, but in the future please split your problems into separate issues unless they are closely related. ( I know I did that a while back, but I was told the same thing. )

Issue 1 is known and being worked on.
Issue 2 has already been implemented. ( If memory serves me well, you use Ctrl+L , try that. If not, check > help defaultkeys as I'm pretty sure it's a hotkey. )
For Issue 3, that's small and can probably be added but we'll want to discuss that with more people that use micro first. A possible alternative is that you could make and submit a whole new theme, which I would encourage if you want to change more than just the status line. :)

If this answer satisfies you, you may close your issue. If not, comment with any more questions or suggestions. Sorry if I wasn't too helpful, I just woke. Have a nice day!

@solyarisoftware
Copy link
Author

thanks!

  • Issue 1 - may you please share the issue # so I'll track solution?

  • Issue 2 - thanks, CTRL-L solves. from inside the editor! beside that It could be useful to have a command line option live vim: vim +23 myfile.go

  • issue 3: just an aesthetic porposal. I supplied a gist for that :)

Let me take this open for a while
thanks
giorgio

@zyedidia
Copy link
Owner

zyedidia commented Mar 4, 2017

The shift selection is specifically an issue with PuTTY. It works with most other terminals. The issue number is #336.

@solyarisoftware
Copy link
Author

In case, feel free to close this issue
thanks
giorgio

@zyedidia
Copy link
Owner

It seems like you might be using the command line vim +23 myfile.go to open files at the line where you were when you closed the file. I should mention the savecursor option which will save where you cursor is when you close a file so that when you reopen the file, the cursor is at the same place.

@solyarisoftware
Copy link
Author

mmhh.

actually the goal of vim +23 myfile.go is usually NOT for going back on at the line where you were when you closed the file (there is another setting for that).

Instead, I use the command line vim feature to speedup editing,
going straight to source file line where I got a "compiling" error.

I'd propose something similar for micro:

 $ micro +23 myfile.top

Otherwise with micro, when I have by example a compiling error on a source file myfile.top, at line 23, I have to:

  • $ micro myfile.top
  • CTRL-L 23

In other words, It could help a plugin/any solution to browse usual list of errors going directly into the lines...

The proposal make sense for you?

Thanks
giorgio

@GeigerCounter
Copy link
Contributor

@Solyaris The difficulty with this is that micro can open many files simultaneously, so how will we parse the command to open many files to specific lines? I understand the purpose of the request, but I'm not sure it'd be something that would be simple to implement with micro's current design. I wouldn't expect this to happen soon, but perhaps someday.

@solyarisoftware
Copy link
Author

solyarisoftware commented Mar 13, 2017

@CaptainMcClellan usually with vi, when compiling from command line, I use the standard syntax feature to jump to a line of a SINGLE file, e.g.

$ ruby +10 topology.rb

See: https://www.cyberciti.biz/faq/linux-unix-command-open-file-linenumber-function/

BTW, see also smart jump-to-line vi plugin to edit multiple files jumping on selected lines/columns:

$ vi topology.json:10 topology.json:22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants