Ubuntu Sublime Text Arrangement

Ubuntu Sublime Text Arrangement

Use Vim-mode

  1. Click "Settings" in the preferences above

  1. Add this code in the code column on the right:
"ignored_packages": [],

  1. Save, open the shortcut key settings in the preferences

  1. 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

  1. click here

  1. 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"

  1. Finally, as shown in the previous picture, select "build_and_run"
You're done!

Guess you like

Origin blog.csdn.net/onlyfirer/article/details/127132873