Skip to content

Instantly share code, notes, and snippets.

@Daniel-Wang
Last active April 23, 2018 18:01
Show Gist options
  • Save Daniel-Wang/f66429c0a2d8211f0e39e4bf9245519a to your computer and use it in GitHub Desktop.
Save Daniel-Wang/f66429c0a2d8211f0e39e4bf9245519a to your computer and use it in GitHub Desktop.
Controller header file for Vm
// Includes here
class Controller {
public:
explicit Controller(Application& app);
void listenForInputs();
private:
void listenInsertMode();
void listenCommandMode();
void listenReplaceMode();
void searchAndHighlight(const std::string &stringCommand, bool highlight = true, bool forward = true, bool fromCurrentLine = true);
void performFindChar();
Application& _app;
bool _quit;
std::string _lastSearchCommand;
std::string _lastFindChar;
void handleCursorMovement(int c);
void handleClearAndDeleteCommands(bool isClearCommand, int times);
void handleYank(int times);
int _repeatCommandNum;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment