Ubuntu Sublime Text Arrangement
Use Vim-mode
- Click "Settings" in the preferences above
- Add this code in the code column on the right:
"ignored_packages": [],
- Save, open the shortcut key settings in the preferences
- Change to the following code:
[
{ "keys": ["k", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
]
save, finished
build system
- click here
- Change to the following code:
/*{
"cmd" : ["gnome-terminal -x bash -c \"g++ $file_name -o ${file_base_name} -lm -Wall; ./${file_base_name}; exec bash\""],
"selector" : "source.c, source.c++",
"shell":true,
"working_dir" : "$file_path"
}*/
{
"encoding": "utf-8",
"working_dir": "$file_path",
"shell_cmd": "g++ \"$file_name\" -std=c++14 -o \"$file_base_name\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.c++",
"variants":
[
{
"name": "Run",
"shell_cmd": "g++ '$file' -std=c++14 -o '$file_base_name' && gnome-terminal -x bash -c \"'${file_path}/${file_base_name}';read -p '\nPress any key to continue...'\""
}
]
}
Save as "build_and_run"
- Finally, as shown in the previous picture, select "build_and_run"