mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
support N to view current note's information in Captain mode
This commit is contained in:
parent
db68df4352
commit
93d2001519
@ -274,6 +274,8 @@ Expand/restore live preview panel.
|
|||||||
Toggle full-text search.
|
Toggle full-text search.
|
||||||
- `P`
|
- `P`
|
||||||
Parse HTML as Markdown text in clipboard and paste.
|
Parse HTML as Markdown text in clipboard and paste.
|
||||||
|
- `N`
|
||||||
|
View and edit current note's information.
|
||||||
- `Shift+?`
|
- `Shift+?`
|
||||||
Display shortcuts documentation.
|
Display shortcuts documentation.
|
||||||
|
|
||||||
@ -283,6 +285,12 @@ Within the Captain Mode, `W` will turn VNote into **Navigation Mode**. In this m
|
|||||||
# Vim Mode
|
# Vim Mode
|
||||||
VNote supports a simple but useful Vim mode, including **Normal**, **Insert**, **Visual**, and **VisualLine** modes.
|
VNote supports a simple but useful Vim mode, including **Normal**, **Insert**, **Visual**, and **VisualLine** modes.
|
||||||
|
|
||||||
|
::: alert-info
|
||||||
|
|
||||||
|
Open `Settings` dialog via the `File` menu, then jump to `Read/Edit` tab and you could enable Vim via the combo box in `Key mode`. Restart VNote to take effect.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
VNote supports following features of Vim:
|
VNote supports following features of Vim:
|
||||||
|
|
||||||
- `r`, `s`, `S`, `i`, `I`, `a`, `A`, `c`, `C`, `o`, and `O`;
|
- `r`, `s`, `S`, `i`, `I`, `a`, `A`, `c`, `C`, `o`, and `O`;
|
||||||
|
@ -265,6 +265,8 @@ RemoveSplit=R
|
|||||||
全文検索を切り替えます。
|
全文検索を切り替えます。
|
||||||
- `P`
|
- `P`
|
||||||
クリップボードのHTMLをMarksownテキストとして貼り付けます。
|
クリップボードのHTMLをMarksownテキストとして貼り付けます。
|
||||||
|
- `N`
|
||||||
|
View and edit current note's information.
|
||||||
- `Shift+?`
|
- `Shift+?`
|
||||||
ショートカットのドキュメントを表示します。
|
ショートカットのドキュメントを表示します。
|
||||||
|
|
||||||
@ -274,6 +276,12 @@ RemoveSplit=R
|
|||||||
# Vimモード
|
# Vimモード
|
||||||
VNoteは、**Normal**、**Insert**、**Visual**、および**VisualLine**の各モードを含む、単純で有用なVimモードをサポートしています。
|
VNoteは、**Normal**、**Insert**、**Visual**、および**VisualLine**の各モードを含む、単純で有用なVimモードをサポートしています。
|
||||||
|
|
||||||
|
::: alert-info
|
||||||
|
|
||||||
|
Open `Settings` dialog via the `File` menu, then jump to `Read/Edit` tab and you could enable Vim via the combo box in `Key mode`. Restart VNote to take effect.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
VNoteはVimの次の機能をサポートしています:
|
VNoteはVimの次の機能をサポートしています:
|
||||||
|
|
||||||
- `r`, `s`, `S`, `i`, `I`, `a`, `A`, `c`, `C`, `o`, and `O`;
|
- `r`, `s`, `S`, `i`, `I`, `a`, `A`, `c`, `C`, `o`, and `O`;
|
||||||
|
@ -275,6 +275,8 @@ RemoveSplit=R
|
|||||||
打开或关闭全文查找。
|
打开或关闭全文查找。
|
||||||
- `P`
|
- `P`
|
||||||
解析剪切板中的HTML为Markdown文本并粘贴。
|
解析剪切板中的HTML为Markdown文本并粘贴。
|
||||||
|
- `N`
|
||||||
|
查看和编辑当前笔记信息。
|
||||||
- `Shift+?`
|
- `Shift+?`
|
||||||
显示本快捷键说明。
|
显示本快捷键说明。
|
||||||
|
|
||||||
@ -284,6 +286,12 @@ RemoveSplit=R
|
|||||||
# Vim Mode
|
# Vim Mode
|
||||||
VNote支持一个简单但有用的Vim模式,包括 **正常**, **插入**, **可视**, **可视行** 模式。
|
VNote支持一个简单但有用的Vim模式,包括 **正常**, **插入**, **可视**, **可视行** 模式。
|
||||||
|
|
||||||
|
::: alert-info
|
||||||
|
|
||||||
|
在`文件`菜单中选择`设置`打开对话框,跳转到`阅读/编辑`标签页,在`按键模式`下拉框中选择开启Vim即可。需要重启VNote以生效。
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
VNote支持以下几个Vim的特性:
|
VNote支持以下几个Vim的特性:
|
||||||
|
|
||||||
- `r`, `s`, `S`, `i`, `I`, `a`, `A`, `c`, `C`, `o`, `O`;
|
- `r`, `s`, `S`, `i`, `I`, `a`, `A`, `c`, `C`, `o`, `O`;
|
||||||
|
@ -541,6 +541,8 @@ ExpandLivePreview=U
|
|||||||
FocusEditArea=Y
|
FocusEditArea=Y
|
||||||
; Parse HTML and paste
|
; Parse HTML and paste
|
||||||
ParseAndPaste=P
|
ParseAndPaste=P
|
||||||
|
; View note info of current edit tab
|
||||||
|
CurrentNoteInfo=N
|
||||||
|
|
||||||
[external_editors]
|
[external_editors]
|
||||||
; Define external editors which could be called to edit notes
|
; Define external editors which could be called to edit notes
|
||||||
|
@ -197,6 +197,10 @@ void VMainWindow::registerCaptainAndNavigationTargets()
|
|||||||
g_config->getCaptainShortcutKeySequence("ExpandMode"),
|
g_config->getCaptainShortcutKeySequence("ExpandMode"),
|
||||||
this,
|
this,
|
||||||
toggleExpandModeByCaptain);
|
toggleExpandModeByCaptain);
|
||||||
|
m_captain->registerCaptainTarget(tr("CurrentNoteInfo"),
|
||||||
|
g_config->getCaptainShortcutKeySequence("CurrentNoteInfo"),
|
||||||
|
this,
|
||||||
|
currentNoteInfoByCaptain);
|
||||||
m_captain->registerCaptainTarget(tr("DiscardAndRead"),
|
m_captain->registerCaptainTarget(tr("DiscardAndRead"),
|
||||||
g_config->getCaptainShortcutKeySequence("DiscardAndRead"),
|
g_config->getCaptainShortcutKeySequence("DiscardAndRead"),
|
||||||
this,
|
this,
|
||||||
@ -731,7 +735,9 @@ QToolBar *VMainWindow::initFileToolBar(QSize p_iconSize)
|
|||||||
m_fileList, &VFileList::newFile);
|
m_fileList, &VFileList::newFile);
|
||||||
|
|
||||||
noteInfoAct = new QAction(VIconUtils::toolButtonIcon(":/resources/icons/note_info_tb.svg"),
|
noteInfoAct = new QAction(VIconUtils::toolButtonIcon(":/resources/icons/note_info_tb.svg"),
|
||||||
tr("Note Info"), this);
|
tr("Note Info"),
|
||||||
|
this);
|
||||||
|
VUtils::fixTextWithCaptainShortcut(noteInfoAct, "CurrentNoteInfo");
|
||||||
noteInfoAct->setStatusTip(tr("View and edit current note's information"));
|
noteInfoAct->setStatusTip(tr("View and edit current note's information"));
|
||||||
connect(noteInfoAct, &QAction::triggered,
|
connect(noteInfoAct, &QAction::triggered,
|
||||||
this, &VMainWindow::curEditFileInfo);
|
this, &VMainWindow::curEditFileInfo);
|
||||||
@ -2858,6 +2864,17 @@ bool VMainWindow::toggleExpandModeByCaptain(void *p_target, void *p_data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool VMainWindow::currentNoteInfoByCaptain(void *p_target, void *p_data)
|
||||||
|
{
|
||||||
|
Q_UNUSED(p_data);
|
||||||
|
VMainWindow *obj = static_cast<VMainWindow *>(p_target);
|
||||||
|
if (obj->noteInfoAct->isEnabled()) {
|
||||||
|
obj->curEditFileInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool VMainWindow::discardAndReadByCaptain(void *p_target, void *p_data)
|
bool VMainWindow::discardAndReadByCaptain(void *p_target, void *p_data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(p_data);
|
Q_UNUSED(p_data);
|
||||||
|
@ -340,6 +340,8 @@ private:
|
|||||||
|
|
||||||
static bool toggleExpandModeByCaptain(void *p_target, void *p_data);
|
static bool toggleExpandModeByCaptain(void *p_target, void *p_data);
|
||||||
|
|
||||||
|
static bool currentNoteInfoByCaptain(void *p_target, void *p_data);
|
||||||
|
|
||||||
static bool discardAndReadByCaptain(void *p_target, void *p_data);
|
static bool discardAndReadByCaptain(void *p_target, void *p_data);
|
||||||
|
|
||||||
static bool toggleToolBarByCaptain(void *p_target, void *p_data);
|
static bool toggleToolBarByCaptain(void *p_target, void *p_data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user