127 posts
Does 4coder have these commands?
Edited by longtran2904 on Reason: Initial post
Does 4coder have these commands? If it does then what's the name and default key binding for it?
1. Multi-select (Alt + shift in VS)
2. Go to the end of the current scope
3. Go to the end of the top scope
4. Copy the current line
5. Cut the current line
6. Paste and replace between the cursor and the marker (rather than delete and then paste)
7. Paste and replace the current line
8. Move multiple lines
9. Move only the content between the cursor and marker (both horizontally and vertically)
10. Kill the run panel and switch back to the previous file
11. Only find in the current file
12. Kill the search panel
13. Create a temporary jump point at the current function/scope/cursor (useful when I want to look something up and then quickly jump back)
14. Go to the declaration
15. Go to the definition
16. Jump back to the previous cursor position

Simon Anciaux
1184 posts
Does 4coder have these commands?
While it's OK to ask question, we are not here to do the work for you.

You can look at the bindings.4coder file to see the default bindings. You can use the command_lister (Alt + X) to see all available commands, and use the command_documentation to get a brief description of what a command does. The custom layer source code is available so you can search for existing commands and modify them to do what you want (it might be overwhelming at first).

Some of what you ask can be done by creating a custom command that calls other commands is sequence. There is a small example in the getting started article in the wiki.

You can also look at Ryan Fleury's custom layer that might contains additional commands/helpers.
127 posts
Does 4coder have these commands?
Edited by longtran2904 on
It's just that sometimes the name of the command is different than what I thought it would be (I'm not a native speaker). Also, 4coder has about 220+ commands, and the commands that I want are very common so I thought if anybody knows some of them, they can just post them here. I also thought that other beginners can use this post as a reference when they first start.

Also, I didn't ask anybody to do any work. If you knew and used some of the commands above frequently, you can just post it here, help me save some time. I didn't ask or expect anybody to look through the document for me.
Simon Anciaux
1184 posts
Does 4coder have these commands?
I apologize for my reply, it could have been worded better.

What I meant by "doing work" is that even if I know some of the answers, I'll need to check the function names, and will be doing almost exactly the same thing that you could do by going through the list to find the correct function (probably faster than you because I know what I'm looking for). That doesn't seem like a lot of work, but writing a useful reply in a forum takes time and effort. So I appreciate when the person asking the question shows that they at least did some work beforehand. That said, I was a bit grumpy at the time I wrote my reply and shouldn't have replied at that time. I'm sorry about that.

1. Multi-select is not supported out of the box. There was an experiment for multi-line edits at some point but it was never reliable and I don't think it's still accessible. One thing that could help though is to use the record/play macro feature that is in 4coder.
2. 3. There are scope functions, use Alt + X and search for scope.
4. 5. You can create simple commands to do that. I don't think it's supported out of the box.
6. 7. I don't understand what "paste and replace" means since you say it's not the same as "delete and paste". Do you mean you don't want to have to delete manually and than past ? If so
 1 2 3 4 CUSTOM_COMMAND_SIG( paste_in_range ) { delete_range( app ); paste( app ); } 

8. I don't know.
9. I don't think there is a way to move things horizontally. I don't think there is a way to move a selection vertically.
10. close_build_panel or close_panel maybe ?
11. I don't think there is (unless you mean incremental search), but you can look at list_all_*** and modify it to only use the current buffer.
12. You can kill it like any other buffer. I don't use the default layout so maybe it's in the bottom panel, it which case maybe close_build_panel would work ?
13. jump_to_last_point, although I don't know which things set the last position.
14. 15. There is jump_to_definition (works with jump_to_last_point).
16. I don't know exactly what you mean, if you mean "undo any cursor movement", that's not in as far as I know.
17. tab in code files is used for auto completion. In other files it will just insert a '\t' character. The function is word_complete and there is a word_complete_drop_down to get a context menu with suggestions, although I didn't find it really usable last time I tried it (a long time ago).
127 posts
Does 4coder have these commands?
Thanks for replying. Don't worry, apologize accepted :).
2, 3. I did try to search for it, but it doesn't seem to be implemented yet. There's only a move to the beginning of the next or previous scope, not the end.
6,7. Yeah, I mean I don't want to have to manually delete and then paste. I want to do both of those things in one command.
10. I mean a separate command for it. Because you can close the build panel with a separate command (Alt + coma by default), so I don't know if there are the same commands for the run panel.
12. I've just found out there is a command to quickly kill the current buffer (kill_buffer, Ctrl + Shift + K by default).
13. I also don't know how it works. I tried to search for it on the command document but it isn't there. If anybody knows, feel free to post it here.
16. Yeah, that's what I meant. Because sometimes I accidentally move the cursor to somewhere else or jump to the wrong place, so having a way to undo it would be useful. Do you think jump_to_last_point works here?

I will try to implement all the missing features from above. If anyone knows more about these features or has already implemented them, feel free to post them here. I will try to post all the code when done.