pycharm直接輸入自定義的縮寫,則自動補全:
方法選擇設置中如圖選擇加號,選擇第一項:
如果有變量選擇編輯變量:
Template text使用的代碼如下:
$.ajax({
url: '$TITLE$',
type: '$type$',
dataType: 'default: Intelligent Guess (Other values: xml, json, script, or html)',
data: {param1: 'value1'}
})
.done(function() {
console.log("success");
})
.fail(function() {
console.log("error");
})
.always(function() {
console.log("complete");
});