1138 act = E5Action(QApplication.translate('ViewManager', 'Move left one character'), |
1138 act = E5Action(QApplication.translate('ViewManager', 'Move left one character'), |
1139 QApplication.translate('ViewManager', 'Move left one character'), |
1139 QApplication.translate('ViewManager', 'Move left one character'), |
1140 QKeySequence(QApplication.translate('ViewManager', 'Left')), 0, |
1140 QKeySequence(QApplication.translate('ViewManager', 'Left')), 0, |
1141 self.editorActGrp, 'vm_edit_move_left_char') |
1141 self.editorActGrp, 'vm_edit_move_left_char') |
1142 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
1142 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
|
1143 if isMacPlatform(): |
|
1144 act.setAlternateShortcut(QKeySequence( |
|
1145 QApplication.translate('ViewManager', 'Meta+B'))) |
1143 act.triggered[()].connect(self.esm.map) |
1146 act.triggered[()].connect(self.esm.map) |
1144 self.editActions.append(act) |
1147 self.editActions.append(act) |
1145 |
1148 |
1146 act = E5Action(QApplication.translate('ViewManager', 'Move right one character'), |
1149 act = E5Action(QApplication.translate('ViewManager', 'Move right one character'), |
1147 QApplication.translate('ViewManager', 'Move right one character'), |
1150 QApplication.translate('ViewManager', 'Move right one character'), |
1148 QKeySequence(QApplication.translate('ViewManager', 'Right')), 0, |
1151 QKeySequence(QApplication.translate('ViewManager', 'Right')), 0, |
1149 self.editorActGrp, 'vm_edit_move_right_char') |
1152 self.editorActGrp, 'vm_edit_move_right_char') |
|
1153 if isMacPlatform(): |
|
1154 act.setAlternateShortcut(QKeySequence( |
|
1155 QApplication.translate('ViewManager', 'Meta+F'))) |
1150 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
1156 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
1151 act.triggered[()].connect(self.esm.map) |
1157 act.triggered[()].connect(self.esm.map) |
1152 self.editActions.append(act) |
1158 self.editActions.append(act) |
1153 |
1159 |
1154 act = E5Action(QApplication.translate('ViewManager', 'Move up one line'), |
1160 act = E5Action(QApplication.translate('ViewManager', 'Move up one line'), |
1155 QApplication.translate('ViewManager', 'Move up one line'), |
1161 QApplication.translate('ViewManager', 'Move up one line'), |
1156 QKeySequence(QApplication.translate('ViewManager', 'Up')), 0, |
1162 QKeySequence(QApplication.translate('ViewManager', 'Up')), 0, |
1157 self.editorActGrp, 'vm_edit_move_up_line') |
1163 self.editorActGrp, 'vm_edit_move_up_line') |
|
1164 if isMacPlatform(): |
|
1165 act.setAlternateShortcut(QKeySequence( |
|
1166 QApplication.translate('ViewManager', 'Meta+P'))) |
1158 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
1167 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
1159 act.triggered[()].connect(self.esm.map) |
1168 act.triggered[()].connect(self.esm.map) |
1160 self.editActions.append(act) |
1169 self.editActions.append(act) |
1161 |
1170 |
1162 act = E5Action(QApplication.translate('ViewManager', 'Move down one line'), |
1171 act = E5Action(QApplication.translate('ViewManager', 'Move down one line'), |
1163 QApplication.translate('ViewManager', 'Move down one line'), |
1172 QApplication.translate('ViewManager', 'Move down one line'), |
1164 QKeySequence(QApplication.translate('ViewManager', 'Down')), 0, |
1173 QKeySequence(QApplication.translate('ViewManager', 'Down')), 0, |
1165 self.editorActGrp, 'vm_edit_move_down_line') |
1174 self.editorActGrp, 'vm_edit_move_down_line') |
|
1175 if isMacPlatform(): |
|
1176 act.setAlternateShortcut(QKeySequence( |
|
1177 QApplication.translate('ViewManager', 'Meta+N'))) |
1166 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
1178 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
1167 act.triggered[()].connect(self.esm.map) |
1179 act.triggered[()].connect(self.esm.map) |
1168 self.editActions.append(act) |
1180 self.editActions.append(act) |
1169 |
1181 |
1170 act = E5Action(QApplication.translate('ViewManager', 'Move left one word part'), |
1182 act = E5Action(QApplication.translate('ViewManager', 'Move left one word part'), |
1171 QApplication.translate('ViewManager', 'Move left one word part'), |
1183 QApplication.translate('ViewManager', 'Move left one word part'), |
1172 QKeySequence(QApplication.translate('ViewManager', 'Alt+Left')), 0, |
1184 0, 0, |
1173 self.editorActGrp, 'vm_edit_move_left_word_part') |
1185 self.editorActGrp, 'vm_edit_move_left_word_part') |
|
1186 if not isMacPlatform(): |
|
1187 act.setShortcut(QKeySequence( |
|
1188 QApplication.translate('ViewManager', 'Alt+Left'))) |
1174 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
1189 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
1175 act.triggered[()].connect(self.esm.map) |
1190 act.triggered[()].connect(self.esm.map) |
1176 self.editActions.append(act) |
1191 self.editActions.append(act) |
1177 |
1192 |
1178 act = E5Action(QApplication.translate('ViewManager', 'Move right one word part'), |
1193 act = E5Action(QApplication.translate('ViewManager', 'Move right one word part'), |
1179 QApplication.translate('ViewManager', 'Move right one word part'), |
1194 QApplication.translate('ViewManager', 'Move right one word part'), |
1180 QKeySequence(QApplication.translate('ViewManager', 'Alt+Right')), 0, |
1195 0, 0, |
1181 self.editorActGrp, 'vm_edit_move_right_word_part') |
1196 self.editorActGrp, 'vm_edit_move_right_word_part') |
|
1197 if not isMacPlatform(): |
|
1198 act.setShortcut(QKeySequence( |
|
1199 QApplication.translate('ViewManager', 'Alt+Right'))) |
1182 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
1200 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
1183 act.triggered[()].connect(self.esm.map) |
1201 act.triggered[()].connect(self.esm.map) |
1184 self.editActions.append(act) |
1202 self.editActions.append(act) |
1185 |
1203 |
1186 act = E5Action(QApplication.translate('ViewManager', 'Move left one word'), |
1204 act = E5Action(QApplication.translate('ViewManager', 'Move left one word'), |
1187 QApplication.translate('ViewManager', 'Move left one word'), |
1205 QApplication.translate('ViewManager', 'Move left one word'), |
1188 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Left')), 0, |
1206 0, 0, |
1189 self.editorActGrp, 'vm_edit_move_left_word') |
1207 self.editorActGrp, 'vm_edit_move_left_word') |
|
1208 if isMacPlatform(): |
|
1209 act.setShortcut(QKeySequence( |
|
1210 QApplication.translate('ViewManager', 'Alt+Left'))) |
|
1211 else: |
|
1212 act.setShortcut(QKeySequence( |
|
1213 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
1190 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
1214 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
1191 act.triggered[()].connect(self.esm.map) |
1215 act.triggered[()].connect(self.esm.map) |
1192 self.editActions.append(act) |
1216 self.editActions.append(act) |
1193 |
1217 |
1194 act = E5Action(QApplication.translate('ViewManager', 'Move right one word'), |
1218 act = E5Action(QApplication.translate('ViewManager', 'Move right one word'), |
1195 QApplication.translate('ViewManager', 'Move right one word'), |
1219 QApplication.translate('ViewManager', 'Move right one word'), |
1196 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Right')), |
1220 0, 0, |
1197 0, |
|
1198 self.editorActGrp, 'vm_edit_move_right_word') |
1221 self.editorActGrp, 'vm_edit_move_right_word') |
|
1222 if isMacPlatform(): |
|
1223 act.setShortcut(QKeySequence( |
|
1224 QApplication.translate('ViewManager', 'Alt+Right'))) |
|
1225 else: |
|
1226 act.setShortcut(QKeySequence( |
|
1227 QApplication.translate('ViewManager', 'Ctrl+Right'))) |
1199 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
1228 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
1200 act.triggered[()].connect(self.esm.map) |
1229 act.triggered[()].connect(self.esm.map) |
1201 self.editActions.append(act) |
1230 self.editActions.append(act) |
1202 |
1231 |
1203 act = E5Action(QApplication.translate('ViewManager', |
1232 act = E5Action(QApplication.translate('ViewManager', |
1204 'Move to first visible character in line'), |
1233 'Move to first visible character in document line'), |
1205 QApplication.translate('ViewManager', |
1234 QApplication.translate('ViewManager', |
1206 'Move to first visible character in line'), |
1235 'Move to first visible character in document line'), |
1207 QKeySequence(QApplication.translate('ViewManager', 'Home')), 0, |
1236 0, 0, |
1208 self.editorActGrp, 'vm_edit_move_first_visible_char') |
1237 self.editorActGrp, 'vm_edit_move_first_visible_char') |
|
1238 if not isMacPlatform(): |
|
1239 act.setShortcut(QKeySequence( |
|
1240 QApplication.translate('ViewManager', 'Home'))) |
1209 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
1241 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
1210 act.triggered[()].connect(self.esm.map) |
1242 act.triggered[()].connect(self.esm.map) |
1211 self.editActions.append(act) |
1243 self.editActions.append(act) |
1212 |
1244 |
1213 act = E5Action(QApplication.translate('ViewManager', |
1245 act = E5Action(QApplication.translate('ViewManager', |
1214 'Move to start of displayed line'), |
1246 'Move to start of display line'), |
1215 QApplication.translate('ViewManager', |
1247 QApplication.translate('ViewManager', |
1216 'Move to start of displayed line'), |
1248 'Move to start of display line'), |
1217 QKeySequence(QApplication.translate('ViewManager', 'Alt+Home')), 0, |
1249 0, 0, |
1218 self.editorActGrp, 'vm_edit_move_start_line') |
1250 self.editorActGrp, 'vm_edit_move_start_line') |
|
1251 if isMacPlatform(): |
|
1252 act.setShortcut(QKeySequence( |
|
1253 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
|
1254 else: |
|
1255 act.setShortcut(QKeySequence( |
|
1256 QApplication.translate('ViewManager', 'Alt+Home'))) |
1219 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
1257 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
1220 act.triggered[()].connect(self.esm.map) |
1258 act.triggered[()].connect(self.esm.map) |
1221 self.editActions.append(act) |
1259 self.editActions.append(act) |
1222 |
1260 |
1223 act = E5Action(QApplication.translate('ViewManager', 'Move to end of line'), |
1261 act = E5Action(QApplication.translate('ViewManager', |
1224 QApplication.translate('ViewManager', 'Move to end of line'), |
1262 'Move to end of document line'), |
1225 QKeySequence(QApplication.translate('ViewManager', 'End')), 0, |
1263 QApplication.translate('ViewManager', |
|
1264 'Move to end of document line'), |
|
1265 0, 0, |
1226 self.editorActGrp, 'vm_edit_move_end_line') |
1266 self.editorActGrp, 'vm_edit_move_end_line') |
|
1267 if isMacPlatform(): |
|
1268 act.setShortcut(QKeySequence( |
|
1269 QApplication.translate('ViewManager', 'Meta+E'))) |
|
1270 else: |
|
1271 act.setShortcut(QKeySequence( |
|
1272 QApplication.translate('ViewManager', 'End'))) |
1227 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
1273 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
1228 act.triggered[()].connect(self.esm.map) |
1274 act.triggered[()].connect(self.esm.map) |
1229 self.editActions.append(act) |
1275 self.editActions.append(act) |
1230 |
1276 |
1231 act = E5Action(QApplication.translate('ViewManager', 'Scroll view down one line'), |
1277 act = E5Action(QApplication.translate('ViewManager', 'Scroll view down one line'), |
1270 |
1316 |
1271 act = E5Action(QApplication.translate('ViewManager', 'Move down one page'), |
1317 act = E5Action(QApplication.translate('ViewManager', 'Move down one page'), |
1272 QApplication.translate('ViewManager', 'Move down one page'), |
1318 QApplication.translate('ViewManager', 'Move down one page'), |
1273 QKeySequence(QApplication.translate('ViewManager', 'PgDown')), 0, |
1319 QKeySequence(QApplication.translate('ViewManager', 'PgDown')), 0, |
1274 self.editorActGrp, 'vm_edit_move_down_page') |
1320 self.editorActGrp, 'vm_edit_move_down_page') |
|
1321 if isMacPlatform(): |
|
1322 act.setAlternateShortcut(QKeySequence( |
|
1323 QApplication.translate('ViewManager', 'Meta+V'))) |
1275 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
1324 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
1276 act.triggered[()].connect(self.esm.map) |
1325 act.triggered[()].connect(self.esm.map) |
1277 self.editActions.append(act) |
1326 self.editActions.append(act) |
1278 |
1327 |
1279 act = E5Action(QApplication.translate('ViewManager', 'Move to start of text'), |
1328 act = E5Action(QApplication.translate('ViewManager', 'Move to start of document'), |
1280 QApplication.translate('ViewManager', 'Move to start of text'), |
1329 QApplication.translate('ViewManager', 'Move to start of document'), |
1281 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Home')), 0, |
1330 0, 0, |
1282 self.editorActGrp, 'vm_edit_move_start_text') |
1331 self.editorActGrp, 'vm_edit_move_start_text') |
|
1332 if isMacPlatform(): |
|
1333 act.setShortcut(QKeySequence( |
|
1334 QApplication.translate('ViewManager', 'Ctrl+Up'))) |
|
1335 else: |
|
1336 act.setShortcut(QKeySequence( |
|
1337 QApplication.translate('ViewManager', 'Ctrl+Home'))) |
1283 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
1338 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
1284 act.triggered[()].connect(self.esm.map) |
1339 act.triggered[()].connect(self.esm.map) |
1285 self.editActions.append(act) |
1340 self.editActions.append(act) |
1286 |
1341 |
1287 act = E5Action(QApplication.translate('ViewManager', 'Move to end of text'), |
1342 act = E5Action(QApplication.translate('ViewManager', 'Move to end of document'), |
1288 QApplication.translate('ViewManager', 'Move to end of text'), |
1343 QApplication.translate('ViewManager', 'Move to end of document'), |
1289 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+End')), 0, |
1344 0, 0, |
1290 self.editorActGrp, 'vm_edit_move_end_text') |
1345 self.editorActGrp, 'vm_edit_move_end_text') |
|
1346 if isMacPlatform(): |
|
1347 act.setShortcut(QKeySequence( |
|
1348 QApplication.translate('ViewManager', 'Ctrl+Down'))) |
|
1349 else: |
|
1350 act.setShortcut(QKeySequence( |
|
1351 QApplication.translate('ViewManager', 'Ctrl+End'))) |
1291 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
1352 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
1292 act.triggered[()].connect(self.esm.map) |
1353 act.triggered[()].connect(self.esm.map) |
1293 self.editActions.append(act) |
1354 self.editActions.append(act) |
1294 |
1355 |
1295 act = E5Action(QApplication.translate('ViewManager', 'Indent one level'), |
1356 act = E5Action(QApplication.translate('ViewManager', 'Indent one level'), |
1345 QApplication.translate('ViewManager', |
1415 QApplication.translate('ViewManager', |
1346 'Extend selection down one line'), |
1416 'Extend selection down one line'), |
1347 QKeySequence(QApplication.translate('ViewManager', 'Shift+Down')), |
1417 QKeySequence(QApplication.translate('ViewManager', 'Shift+Down')), |
1348 0, |
1418 0, |
1349 self.editorActGrp, 'vm_edit_extend_selection_down_line') |
1419 self.editorActGrp, 'vm_edit_extend_selection_down_line') |
|
1420 if isMacPlatform(): |
|
1421 act.setAlternateShortcut(QKeySequence( |
|
1422 QApplication.translate('ViewManager', 'Meta+Shift+N'))) |
1350 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
1423 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
1351 act.triggered[()].connect(self.esm.map) |
1424 act.triggered[()].connect(self.esm.map) |
1352 self.editActions.append(act) |
1425 self.editActions.append(act) |
1353 |
1426 |
1354 act = E5Action(QApplication.translate('ViewManager', |
1427 act = E5Action(QApplication.translate('ViewManager', |
1355 'Extend selection left one word part'), |
1428 'Extend selection left one word part'), |
1356 QApplication.translate('ViewManager', |
1429 QApplication.translate('ViewManager', |
1357 'Extend selection left one word part'), |
1430 'Extend selection left one word part'), |
1358 QKeySequence(QApplication.translate('ViewManager', |
1431 0, 0, |
1359 'Alt+Shift+Left')), |
|
1360 0, |
|
1361 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') |
1432 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') |
|
1433 if not isMacPlatform(): |
|
1434 act.setShortcut(QKeySequence( |
|
1435 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
1362 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
1436 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
1363 act.triggered[()].connect(self.esm.map) |
1437 act.triggered[()].connect(self.esm.map) |
1364 self.editActions.append(act) |
1438 self.editActions.append(act) |
1365 |
1439 |
1366 act = E5Action(QApplication.translate('ViewManager', |
1440 act = E5Action(QApplication.translate('ViewManager', |
1367 'Extend selection right one word part'), |
1441 'Extend selection right one word part'), |
1368 QApplication.translate('ViewManager', |
1442 QApplication.translate('ViewManager', |
1369 'Extend selection right one word part'), |
1443 'Extend selection right one word part'), |
1370 QKeySequence(QApplication.translate('ViewManager', |
1444 0, 0, |
1371 'Alt+Shift+Right')), |
|
1372 0, |
|
1373 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') |
1445 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') |
|
1446 if not isMacPlatform(): |
|
1447 act.setShortcut(QKeySequence( |
|
1448 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1374 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
1449 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
1375 act.triggered[()].connect(self.esm.map) |
1450 act.triggered[()].connect(self.esm.map) |
1376 self.editActions.append(act) |
1451 self.editActions.append(act) |
1377 |
1452 |
1378 act = E5Action(QApplication.translate('ViewManager', |
1453 act = E5Action(QApplication.translate('ViewManager', |
1379 'Extend selection left one word'), |
1454 'Extend selection left one word'), |
1380 QApplication.translate('ViewManager', |
1455 QApplication.translate('ViewManager', |
1381 'Extend selection left one word'), |
1456 'Extend selection left one word'), |
1382 QKeySequence(QApplication.translate('ViewManager', |
1457 0, 0, |
1383 'Ctrl+Shift+Left')), |
|
1384 0, |
|
1385 self.editorActGrp, 'vm_edit_extend_selection_left_word') |
1458 self.editorActGrp, 'vm_edit_extend_selection_left_word') |
|
1459 if isMacPlatform(): |
|
1460 act.setShortcut(QKeySequence( |
|
1461 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
|
1462 else: |
|
1463 act.setShortcut(QKeySequence( |
|
1464 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
1386 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
1465 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
1387 act.triggered[()].connect(self.esm.map) |
1466 act.triggered[()].connect(self.esm.map) |
1388 self.editActions.append(act) |
1467 self.editActions.append(act) |
1389 |
1468 |
1390 act = E5Action(QApplication.translate('ViewManager', |
1469 act = E5Action(QApplication.translate('ViewManager', |
1391 'Extend selection right one word'), |
1470 'Extend selection right one word'), |
1392 QApplication.translate('ViewManager', |
1471 QApplication.translate('ViewManager', |
1393 'Extend selection right one word'), |
1472 'Extend selection right one word'), |
1394 QKeySequence(QApplication.translate('ViewManager', |
1473 0, 0, |
1395 'Ctrl+Shift+Right')), |
|
1396 0, |
|
1397 self.editorActGrp, 'vm_edit_extend_selection_right_word') |
1474 self.editorActGrp, 'vm_edit_extend_selection_right_word') |
|
1475 if isMacPlatform(): |
|
1476 act.setShortcut(QKeySequence( |
|
1477 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
|
1478 else: |
|
1479 act.setShortcut(QKeySequence( |
|
1480 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) |
1398 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) |
1481 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) |
1399 act.triggered[()].connect(self.esm.map) |
1482 act.triggered[()].connect(self.esm.map) |
1400 self.editActions.append(act) |
1483 self.editActions.append(act) |
1401 |
1484 |
1402 act = E5Action(QApplication.translate('ViewManager', |
1485 act = E5Action(QApplication.translate('ViewManager', |
1403 'Extend selection to first visible character in line'), |
1486 'Extend selection to first visible character in document line'), |
1404 QApplication.translate('ViewManager', |
1487 QApplication.translate('ViewManager', |
1405 'Extend selection to first visible character in line'), |
1488 'Extend selection to first visible character in document line'), |
1406 QKeySequence(QApplication.translate('ViewManager', 'Shift+Home')), |
1489 0, 0, |
1407 0, |
|
1408 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') |
1490 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') |
|
1491 if not isMacPlatform(): |
|
1492 act.setShortcut(QKeySequence( |
|
1493 QApplication.translate('ViewManager', 'Shift+Home'))) |
1409 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
1494 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
1410 act.triggered[()].connect(self.esm.map) |
1495 act.triggered[()].connect(self.esm.map) |
1411 self.editActions.append(act) |
1496 self.editActions.append(act) |
1412 |
1497 |
1413 act = E5Action(QApplication.translate('ViewManager', |
1498 act = E5Action(QApplication.translate('ViewManager', |
1414 'Extend selection to start of line'), |
1499 'Extend selection to end of document line'), |
1415 QApplication.translate('ViewManager', |
1500 QApplication.translate('ViewManager', |
1416 'Extend selection to start of line'), |
1501 'Extend selection to end of document line'), |
1417 QKeySequence(QApplication.translate('ViewManager', |
1502 0, 0, |
1418 'Alt+Shift+Home')), |
|
1419 0, |
|
1420 self.editorActGrp, 'vm_edit_extend_selection_start_line') |
|
1421 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
|
1422 act.triggered[()].connect(self.esm.map) |
|
1423 self.editActions.append(act) |
|
1424 |
|
1425 act = E5Action(QApplication.translate('ViewManager', |
|
1426 'Extend selection to end of line'), |
|
1427 QApplication.translate('ViewManager', |
|
1428 'Extend selection to end of line'), |
|
1429 QKeySequence(QApplication.translate('ViewManager', 'Shift+End')), 0, |
|
1430 self.editorActGrp, 'vm_edit_extend_selection_end_line') |
1503 self.editorActGrp, 'vm_edit_extend_selection_end_line') |
|
1504 if isMacPlatform(): |
|
1505 act.setShortcut(QKeySequence( |
|
1506 QApplication.translate('ViewManager', 'Meta+Shift+E'))) |
|
1507 else: |
|
1508 act.setShortcut(QKeySequence( |
|
1509 QApplication.translate('ViewManager', 'Shift+End'))) |
1431 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) |
1510 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) |
1432 act.triggered[()].connect(self.esm.map) |
1511 act.triggered[()].connect(self.esm.map) |
1433 self.editActions.append(act) |
1512 self.editActions.append(act) |
1434 |
1513 |
1435 act = E5Action(QApplication.translate('ViewManager', |
1514 act = E5Action(QApplication.translate('ViewManager', |
1471 QApplication.translate('ViewManager', |
1550 QApplication.translate('ViewManager', |
1472 'Extend selection down one page'), |
1551 'Extend selection down one page'), |
1473 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgDown')), |
1552 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgDown')), |
1474 0, |
1553 0, |
1475 self.editorActGrp, 'vm_edit_extend_selection_down_page') |
1554 self.editorActGrp, 'vm_edit_extend_selection_down_page') |
|
1555 if isMacPlatform(): |
|
1556 act.setAlternateShortcut(QKeySequence( |
|
1557 QApplication.translate('ViewManager', 'Meta+Shift+V'))) |
1476 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
1558 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
1477 act.triggered[()].connect(self.esm.map) |
1559 act.triggered[()].connect(self.esm.map) |
1478 self.editActions.append(act) |
1560 self.editActions.append(act) |
1479 |
1561 |
1480 act = E5Action(QApplication.translate('ViewManager', |
1562 act = E5Action(QApplication.translate('ViewManager', |
1481 'Extend selection to start of text'), |
1563 'Extend selection to start of document'), |
1482 QApplication.translate('ViewManager', |
1564 QApplication.translate('ViewManager', |
1483 'Extend selection to start of text'), |
1565 'Extend selection to start of document'), |
1484 QKeySequence(QApplication.translate('ViewManager', |
1566 0, 0, |
1485 'Ctrl+Shift+Home')), |
|
1486 0, |
|
1487 self.editorActGrp, 'vm_edit_extend_selection_start_text') |
1567 self.editorActGrp, 'vm_edit_extend_selection_start_text') |
|
1568 if isMacPlatform(): |
|
1569 act.setShortcut(QKeySequence( |
|
1570 QApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) |
|
1571 else: |
|
1572 act.setShortcut(QKeySequence( |
|
1573 QApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) |
1488 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
1574 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
1489 act.triggered[()].connect(self.esm.map) |
1575 act.triggered[()].connect(self.esm.map) |
1490 self.editActions.append(act) |
1576 self.editActions.append(act) |
1491 |
1577 |
1492 act = E5Action(QApplication.translate('ViewManager', |
1578 act = E5Action(QApplication.translate('ViewManager', |
1493 'Extend selection to end of text'), |
1579 'Extend selection to end of document'), |
1494 QApplication.translate('ViewManager', |
1580 QApplication.translate('ViewManager', |
1495 'Extend selection to end of text'), |
1581 'Extend selection to end of document'), |
1496 QKeySequence(QApplication.translate('ViewManager', |
1582 0, 0, |
1497 'Ctrl+Shift+End')), |
|
1498 0, |
|
1499 self.editorActGrp, 'vm_edit_extend_selection_end_text') |
1583 self.editorActGrp, 'vm_edit_extend_selection_end_text') |
|
1584 if isMacPlatform(): |
|
1585 act.setShortcut(QKeySequence( |
|
1586 QApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) |
|
1587 else: |
|
1588 act.setShortcut(QKeySequence( |
|
1589 QApplication.translate('ViewManager', 'Ctrl+Shift+End'))) |
1500 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
1590 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
1501 act.triggered[()].connect(self.esm.map) |
1591 act.triggered[()].connect(self.esm.map) |
1502 self.editActions.append(act) |
1592 self.editActions.append(act) |
1503 |
1593 |
1504 act = E5Action(QApplication.translate('ViewManager', |
1594 act = E5Action(QApplication.translate('ViewManager', |
1505 'Delete previous character'), |
1595 'Delete previous character'), |
1506 QApplication.translate('ViewManager', 'Delete previous character'), |
1596 QApplication.translate('ViewManager', 'Delete previous character'), |
1507 QKeySequence(QApplication.translate('ViewManager', 'Backspace')), |
1597 QKeySequence(QApplication.translate('ViewManager', 'Backspace')), |
1508 QKeySequence(QApplication.translate('ViewManager', |
1598 0, |
1509 'Shift+Backspace')), |
|
1510 self.editorActGrp, 'vm_edit_delete_previous_char') |
1599 self.editorActGrp, 'vm_edit_delete_previous_char') |
|
1600 if isMacPlatform(): |
|
1601 act.setAlternateShortcut(QKeySequence( |
|
1602 QApplication.translate('ViewManager', 'Meta+H'))) |
|
1603 else: |
|
1604 act.setAlternateShortcut(QKeySequence( |
|
1605 QApplication.translate('ViewManager', 'Shift+Backspace'))) |
1511 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
1606 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
1512 act.triggered[()].connect(self.esm.map) |
1607 act.triggered[()].connect(self.esm.map) |
1513 self.editActions.append(act) |
1608 self.editActions.append(act) |
1514 |
1609 |
1515 act = E5Action(QApplication.translate('ViewManager', |
1610 act = E5Action(QApplication.translate('ViewManager', |
1516 'Delete previous character if not at line start'), |
1611 'Delete previous character if not at start of line'), |
1517 QApplication.translate('ViewManager', |
1612 QApplication.translate('ViewManager', |
1518 'Delete previous character if not at line start'), |
1613 'Delete previous character if not at start of line'), |
1519 0, 0, |
1614 0, 0, |
1520 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') |
1615 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') |
1521 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
1616 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
1522 act.triggered[()].connect(self.esm.map) |
1617 act.triggered[()].connect(self.esm.map) |
1523 self.editActions.append(act) |
1618 self.editActions.append(act) |
1524 |
1619 |
1525 act = E5Action(QApplication.translate('ViewManager', 'Delete current character'), |
1620 act = E5Action(QApplication.translate('ViewManager', 'Delete current character'), |
1526 QApplication.translate('ViewManager', 'Delete current character'), |
1621 QApplication.translate('ViewManager', 'Delete current character'), |
1527 QKeySequence(QApplication.translate('ViewManager', 'Del')), 0, |
1622 QKeySequence(QApplication.translate('ViewManager', 'Del')), 0, |
1528 self.editorActGrp, 'vm_edit_delete_current_char') |
1623 self.editorActGrp, 'vm_edit_delete_current_char') |
|
1624 if isMacPlatform(): |
|
1625 act.setAlternateShortcut(QKeySequence( |
|
1626 QApplication.translate('ViewManager', 'Meta+D'))) |
1529 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
1627 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
1530 act.triggered[()].connect(self.esm.map) |
1628 act.triggered[()].connect(self.esm.map) |
1531 self.editActions.append(act) |
1629 self.editActions.append(act) |
1532 |
1630 |
1533 act = E5Action(QApplication.translate('ViewManager', 'Delete word to left'), |
1631 act = E5Action(QApplication.translate('ViewManager', 'Delete word to left'), |
1739 'Extend rectangular selection right one character'), |
1859 'Extend rectangular selection right one character'), |
1740 QKeySequence(QApplication.translate('ViewManager', |
1860 QKeySequence(QApplication.translate('ViewManager', |
1741 'Alt+Ctrl+Right')), |
1861 'Alt+Ctrl+Right')), |
1742 0, |
1862 0, |
1743 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') |
1863 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') |
|
1864 if isMacPlatform(): |
|
1865 act.setAlternateShortcut(QKeySequence( |
|
1866 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) |
1744 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
1867 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
1745 act.triggered[()].connect(self.esm.map) |
1868 act.triggered[()].connect(self.esm.map) |
1746 self.editActions.append(act) |
1869 self.editActions.append(act) |
1747 |
1870 |
1748 act = E5Action(QApplication.translate('ViewManager', |
1871 act = E5Action(QApplication.translate('ViewManager', |
1749 'Extend rectangular selection to first' |
1872 'Extend rectangular selection to first' |
1750 ' visible character in line'), |
1873 ' visible character in document line'), |
1751 QApplication.translate('ViewManager', |
1874 QApplication.translate('ViewManager', |
1752 'Extend rectangular selection to first' |
1875 'Extend rectangular selection to first' |
1753 ' visible character in line'), |
1876 ' visible character in document line'), |
1754 QKeySequence(QApplication.translate('ViewManager', |
1877 0, 0, |
1755 'Alt+Ctrl+Home')), |
|
1756 0, |
|
1757 self.editorActGrp, |
1878 self.editorActGrp, |
1758 'vm_edit_extend_rect_selection_first_visible_char') |
1879 'vm_edit_extend_rect_selection_first_visible_char') |
|
1880 if not isMacPlatform(): |
|
1881 act.setShortcut(QKeySequence( |
|
1882 QApplication.translate('ViewManager', 'Alt+Shift+Home'))) |
1759 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
1883 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
1760 act.triggered[()].connect(self.esm.map) |
1884 act.triggered[()].connect(self.esm.map) |
1761 self.editActions.append(act) |
1885 self.editActions.append(act) |
1762 |
1886 |
1763 act = E5Action(QApplication.translate('ViewManager', |
1887 act = E5Action(QApplication.translate('ViewManager', |
1764 'Extend rectangular selection to end of line'), |
1888 'Extend rectangular selection to end of document line'), |
1765 QApplication.translate('ViewManager', |
1889 QApplication.translate('ViewManager', |
1766 'Extend rectangular selection to end of line'), |
1890 'Extend rectangular selection to end of document line'), |
1767 QKeySequence(QApplication.translate('ViewManager', 'Alt+Ctrl+End')), |
1891 0, 0, |
1768 0, |
|
1769 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') |
1892 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') |
|
1893 if isMacPlatform(): |
|
1894 act.setShortcut(QKeySequence( |
|
1895 QApplication.translate('ViewManager', 'Meta+Alt+Shift+E'))) |
|
1896 else: |
|
1897 act.setShortcut(QKeySequence( |
|
1898 QApplication.translate('ViewManager', 'Alt+Shift+End'))) |
1770 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
1899 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
1771 act.triggered[()].connect(self.esm.map) |
1900 act.triggered[()].connect(self.esm.map) |
1772 self.editActions.append(act) |
1901 self.editActions.append(act) |
1773 |
1902 |
1774 act = E5Action(QApplication.translate('ViewManager', |
1903 act = E5Action(QApplication.translate('ViewManager', |
1803 0, |
1935 0, |
1804 self.editorActGrp, 'vm_edit_duplicate_current_selection') |
1936 self.editorActGrp, 'vm_edit_duplicate_current_selection') |
1805 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
1937 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
1806 act.triggered[()].connect(self.esm.map) |
1938 act.triggered[()].connect(self.esm.map) |
1807 self.editActions.append(act) |
1939 self.editActions.append(act) |
|
1940 |
|
1941 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
|
1942 act = E5Action(QApplication.translate('ViewManager', |
|
1943 'Scroll to start of document'), |
|
1944 QApplication.translate('ViewManager', |
|
1945 'Scroll to start of document'), |
|
1946 0, 0, |
|
1947 self.editorActGrp, 'vm_edit_scroll_start_text') |
|
1948 if isMacPlatform(): |
|
1949 act.setShortcut(QKeySequence( |
|
1950 QApplication.translate('ViewManager', 'Home'))) |
|
1951 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) |
|
1952 act.triggered[()].connect(self.esm.map) |
|
1953 self.editActions.append(act) |
|
1954 |
|
1955 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): |
|
1956 act = E5Action(QApplication.translate('ViewManager', |
|
1957 'Scroll to end of document'), |
|
1958 QApplication.translate('ViewManager', |
|
1959 'Scroll to end of document'), |
|
1960 0, 0, |
|
1961 self.editorActGrp, 'vm_edit_scroll_end_text') |
|
1962 if isMacPlatform(): |
|
1963 act.setShortcut(QKeySequence( |
|
1964 QApplication.translate('ViewManager', 'End'))) |
|
1965 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) |
|
1966 act.triggered[()].connect(self.esm.map) |
|
1967 self.editActions.append(act) |
|
1968 |
|
1969 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): |
|
1970 act = E5Action(QApplication.translate('ViewManager', |
|
1971 'Scroll vertically to center current line'), |
|
1972 QApplication.translate('ViewManager', |
|
1973 'Scroll vertically to center current line'), |
|
1974 0, 0, |
|
1975 self.editorActGrp, 'vm_edit_scroll_vertically_center') |
|
1976 if isMacPlatform(): |
|
1977 act.setShortcut(QKeySequence( |
|
1978 QApplication.translate('ViewManager', 'Meta+L'))) |
|
1979 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) |
|
1980 act.triggered[()].connect(self.esm.map) |
|
1981 self.editActions.append(act) |
|
1982 |
|
1983 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): |
|
1984 act = E5Action(QApplication.translate('ViewManager', |
|
1985 'Move to end of next word'), |
|
1986 QApplication.translate('ViewManager', |
|
1987 'Move to end of next word'), |
|
1988 0, 0, |
|
1989 self.editorActGrp, 'vm_edit_move_end_next_word') |
|
1990 if isMacPlatform(): |
|
1991 act.setShortcut(QKeySequence( |
|
1992 QApplication.translate('ViewManager', 'Alt+Right'))) |
|
1993 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) |
|
1994 act.triggered[()].connect(self.esm.map) |
|
1995 self.editActions.append(act) |
|
1996 |
|
1997 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): |
|
1998 act = E5Action(QApplication.translate('ViewManager', |
|
1999 'Extend selection to end of next word'), |
|
2000 QApplication.translate('ViewManager', |
|
2001 'Extend selection to end of next word'), |
|
2002 0, 0, |
|
2003 self.editorActGrp, 'vm_edit_select_end_next_word') |
|
2004 if isMacPlatform(): |
|
2005 act.setShortcut(QKeySequence( |
|
2006 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
|
2007 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) |
|
2008 act.triggered[()].connect(self.esm.map) |
|
2009 self.editActions.append(act) |
|
2010 |
|
2011 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): |
|
2012 act = E5Action(QApplication.translate('ViewManager', |
|
2013 'Move to end of previous word'), |
|
2014 QApplication.translate('ViewManager', |
|
2015 'Move to end of previous word'), |
|
2016 0, 0, |
|
2017 self.editorActGrp, 'vm_edit_move_end_previous_word') |
|
2018 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) |
|
2019 act.triggered[()].connect(self.esm.map) |
|
2020 self.editActions.append(act) |
|
2021 |
|
2022 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): |
|
2023 act = E5Action(QApplication.translate('ViewManager', |
|
2024 'Extend selection to end of previous word'), |
|
2025 QApplication.translate('ViewManager', |
|
2026 'Extend selection to end of previous word'), |
|
2027 0, 0, |
|
2028 self.editorActGrp, 'vm_edit_select_end_previous_word') |
|
2029 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) |
|
2030 act.triggered[()].connect(self.esm.map) |
|
2031 self.editActions.append(act) |
|
2032 |
|
2033 if hasattr(QsciScintilla, "SCI_HOME"): |
|
2034 act = E5Action(QApplication.translate('ViewManager', |
|
2035 'Move to start of document line'), |
|
2036 QApplication.translate('ViewManager', |
|
2037 'Move to start of document line'), |
|
2038 0, 0, |
|
2039 self.editorActGrp, 'vm_edit_move_start_document_line') |
|
2040 if isMacPlatform(): |
|
2041 act.setShortcut(QKeySequence( |
|
2042 QApplication.translate('ViewManager', 'Meta+A'))) |
|
2043 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
|
2044 act.triggered[()].connect(self.esm.map) |
|
2045 self.editActions.append(act) |
|
2046 |
|
2047 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): |
|
2048 act = E5Action(QApplication.translate('ViewManager', |
|
2049 'Extend selection to start of document line'), |
|
2050 QApplication.translate('ViewManager', |
|
2051 'Extend selection to start of document line'), |
|
2052 0, 0, |
|
2053 self.editorActGrp, 'vm_edit_extend_selection_start_document_line') |
|
2054 if isMacPlatform(): |
|
2055 act.setShortcut(QKeySequence( |
|
2056 QApplication.translate('ViewManager', 'Meta+Shift+A'))) |
|
2057 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
|
2058 act.triggered[()].connect(self.esm.map) |
|
2059 self.editActions.append(act) |
|
2060 |
|
2061 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): |
|
2062 act = E5Action(QApplication.translate('ViewManager', |
|
2063 'Extend rectangular selection to start of document line'), |
|
2064 QApplication.translate('ViewManager', |
|
2065 'Extend rectangular selection to start of document line'), |
|
2066 0, 0, |
|
2067 self.editorActGrp, 'vm_edit_select_rect_start_line') |
|
2068 if isMacPlatform(): |
|
2069 act.setShortcut(QKeySequence( |
|
2070 QApplication.translate('ViewManager', 'Meta+Alt+Shift+A'))) |
|
2071 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) |
|
2072 act.triggered[()].connect(self.esm.map) |
|
2073 self.editActions.append(act) |
|
2074 |
|
2075 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): |
|
2076 act = E5Action(QApplication.translate('ViewManager', |
|
2077 'Extend selection to start of display line'), |
|
2078 QApplication.translate('ViewManager', |
|
2079 'Extend selection to start of display line'), |
|
2080 0, 0, |
|
2081 self.editorActGrp, 'vm_edit_extend_selection_start_display_line') |
|
2082 if isMacPlatform(): |
|
2083 act.setShortcut(QKeySequence( |
|
2084 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
|
2085 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
|
2086 act.triggered[()].connect(self.esm.map) |
|
2087 self.editActions.append(act) |
|
2088 |
|
2089 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): |
|
2090 act = E5Action(QApplication.translate('ViewManager', |
|
2091 'Move to start of display or document line'), |
|
2092 QApplication.translate('ViewManager', |
|
2093 'Move to start of display or document line'), |
|
2094 0, 0, |
|
2095 self.editorActGrp, 'vm_edit_move_start_display_document_line') |
|
2096 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) |
|
2097 act.triggered[()].connect(self.esm.map) |
|
2098 self.editActions.append(act) |
|
2099 |
|
2100 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): |
|
2101 act = E5Action(QApplication.translate('ViewManager', |
|
2102 'Extend selection to start of display or document line'), |
|
2103 QApplication.translate('ViewManager', |
|
2104 'Extend selection to start of display or document line'), |
|
2105 0, 0, |
|
2106 self.editorActGrp, |
|
2107 'vm_edit_extend_selection_start_display_document_line') |
|
2108 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND) |
|
2109 act.triggered[()].connect(self.esm.map) |
|
2110 self.editActions.append(act) |
|
2111 |
|
2112 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): |
|
2113 act = E5Action(QApplication.translate('ViewManager', |
|
2114 'Move to first visible character in display' |
|
2115 ' or document line'), |
|
2116 QApplication.translate('ViewManager', |
|
2117 'Move to first visible character in display' |
|
2118 ' or document line'), |
|
2119 0, 0, |
|
2120 self.editorActGrp, |
|
2121 'vm_edit_move_first_visible_char_document_line') |
|
2122 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP) |
|
2123 act.triggered[()].connect(self.esm.map) |
|
2124 self.editActions.append(act) |
|
2125 |
|
2126 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"): |
|
2127 act = E5Action(QApplication.translate('ViewManager', |
|
2128 'Extend selection to first visible character in' |
|
2129 ' display or document line'), |
|
2130 QApplication.translate('ViewManager', |
|
2131 'Extend selection to first visible character in' |
|
2132 ' display or document line'), |
|
2133 0, 0, |
|
2134 self.editorActGrp, |
|
2135 'vm_edit_extend_selection_first_visible_char_document_line') |
|
2136 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAPEXTEND) |
|
2137 act.triggered[()].connect(self.esm.map) |
|
2138 self.editActions.append(act) |
|
2139 |
|
2140 if hasattr(QsciScintilla, "SCI_LINEENDWRAP"): |
|
2141 act = E5Action(QApplication.translate('ViewManager', |
|
2142 'Move to end of display or document line'), |
|
2143 QApplication.translate('ViewManager', |
|
2144 'Move to end of display or document line'), |
|
2145 0, 0, |
|
2146 self.editorActGrp, 'vm_edit_end_start_display_document_line') |
|
2147 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAP) |
|
2148 act.triggered[()].connect(self.esm.map) |
|
2149 self.editActions.append(act) |
|
2150 |
|
2151 if hasattr(QsciScintilla, "SCI_LINEENDWRAPEXTEND"): |
|
2152 act = E5Action(QApplication.translate('ViewManager', |
|
2153 'Extend selection to end of display or document line'), |
|
2154 QApplication.translate('ViewManager', |
|
2155 'Extend selection to end of display or document line'), |
|
2156 0, 0, |
|
2157 self.editorActGrp, |
|
2158 'vm_edit_extend_selection_end_display_document_line') |
|
2159 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAPEXTEND) |
|
2160 act.triggered[()].connect(self.esm.map) |
|
2161 self.editActions.append(act) |
|
2162 |
|
2163 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"): |
|
2164 act = E5Action(QApplication.translate('ViewManager', |
|
2165 'Stuttered move up one page'), |
|
2166 QApplication.translate('ViewManager', |
|
2167 'Stuttered move up one page'), |
|
2168 0, 0, |
|
2169 self.editorActGrp, 'vm_edit_stuttered_move_up_page') |
|
2170 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP) |
|
2171 act.triggered[()].connect(self.esm.map) |
|
2172 self.editActions.append(act) |
|
2173 |
|
2174 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"): |
|
2175 act = E5Action(QApplication.translate('ViewManager', |
|
2176 'Stuttered extend selection up one page'), |
|
2177 QApplication.translate('ViewManager', |
|
2178 'Stuttered extend selection up one page'), |
|
2179 0, 0, |
|
2180 self.editorActGrp, 'vm_edit_stuttered_extend_selection_up_page') |
|
2181 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND) |
|
2182 act.triggered[()].connect(self.esm.map) |
|
2183 self.editActions.append(act) |
|
2184 |
|
2185 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"): |
|
2186 act = E5Action(QApplication.translate('ViewManager', |
|
2187 'Stuttered move down one page'), |
|
2188 QApplication.translate('ViewManager', |
|
2189 'Stuttered move down one page'), |
|
2190 0, 0, |
|
2191 self.editorActGrp, 'vm_edit_stuttered_move_down_page') |
|
2192 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) |
|
2193 act.triggered[()].connect(self.esm.map) |
|
2194 self.editActions.append(act) |
|
2195 |
|
2196 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"): |
|
2197 act = E5Action(QApplication.translate('ViewManager', |
|
2198 'Stuttered extend selection down one page'), |
|
2199 QApplication.translate('ViewManager', |
|
2200 'Stuttered extend selection down one page'), |
|
2201 0, 0, |
|
2202 self.editorActGrp, 'vm_edit_stuttered_extend_selection_down_page') |
|
2203 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND) |
|
2204 act.triggered[()].connect(self.esm.map) |
|
2205 self.editActions.append(act) |
|
2206 |
|
2207 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"): |
|
2208 act = E5Action(QApplication.translate('ViewManager', |
|
2209 'Delete right to end of next word'), |
|
2210 QApplication.translate('ViewManager', |
|
2211 'Delete right to end of next word'), |
|
2212 0, 0, |
|
2213 self.editorActGrp, 'vm_edit_delete_right_end_next_word') |
|
2214 if isMacPlatform(): |
|
2215 act.setShortcut(QKeySequence( |
|
2216 QApplication.translate('ViewManager', 'Alt+Del'))) |
|
2217 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND) |
|
2218 act.triggered[()].connect(self.esm.map) |
|
2219 self.editActions.append(act) |
|
2220 |
|
2221 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"): |
|
2222 act = E5Action(QApplication.translate('ViewManager', |
|
2223 'Move selected lines up one line'), |
|
2224 QApplication.translate('ViewManager', |
|
2225 'Move selected lines up one line'), |
|
2226 0, 0, |
|
2227 self.editorActGrp, 'vm_edit_move_selection_up_one_line') |
|
2228 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP) |
|
2229 act.triggered[()].connect(self.esm.map) |
|
2230 self.editActions.append(act) |
|
2231 |
|
2232 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"): |
|
2233 act = E5Action(QApplication.translate('ViewManager', |
|
2234 'Move selected lines down one line'), |
|
2235 QApplication.translate('ViewManager', |
|
2236 'Move selected lines down one line'), |
|
2237 0, 0, |
|
2238 self.editorActGrp, 'vm_edit_move_selection_down_one_line') |
|
2239 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN) |
|
2240 act.triggered[()].connect(self.esm.map) |
|
2241 self.editActions.append(act) |
1808 |
2242 |
1809 self.editorActGrp.setEnabled(False) |
2243 self.editorActGrp.setEnabled(False) |
1810 |
2244 |
1811 def initEditMenu(self): |
2245 def initEditMenu(self): |
1812 """ |
2246 """ |