Shortcuts to copy bibtex and citation key in Zotero - mendeley

In Mendeley I can type ctrl+c to copy an article's bibtex entry, and ctrl+k to copy a latex cite command with that article's cite key.
How can I do the same in Zotero? I am running Better Bibtex.

I had the same problem. First, make sure the Better BibTeX add-on works and is there to help you with the quick-copy:
Edit > Prefernences > BetterBibteX > Export > Quick-Copy (to configure):
Then, in Edit > Preferences > Export > Quick Copy / Item format, pick the right better-bibtex format for you in the dropdown menu:
Then your Ctrl + Shift + C should copy the key no problem:
\cite{fengDrugCombinationsBorrelia2015}

Related

How to copy from nvim to clipboard. (nvim remote or in Docker)

I can't figure out how to copy from vim, and paste to another console tab.
For instance, I'm using the preconfigured nvimdocker / ansible-neovim-pyright container. I did try:
set mouse= I can copy/paste with middle click, but I get the column with line numbers in the clipboard. Makes it unpracticable to copy few lines of script.
set mouse=nv This is great, I can select the text without the line numbers. Potentially right-click->Copy. But none of the * (highlight clipboard) nor + (system clipboard) registers are working. (None of the middle-click or explicit paste will work).
Obviously, it's not possible to access the system clipboard from remote, and xclip cannot help. I think the problem is similar when using a remote nvim through SSH (with no X redirection).
But how could I have the 'highlight' clipboard ? Is there maybe a (n)vim command to temporarily disable the left column with numbers/git/modifs/coc-errors ?
Thanks,

Equivalent of Notepad++ SCI_LINECOPY in Visual Studio 2019?

In Notepad++, view Settings > Shortcut Mapper > Scintilla commands. The command SCI_LINECOPY, currently assigned to Ctrl + Shift + X, copies the current line to the clipboard for pasting elsewhere. Very nice!
Does Visual Studio 2019 have something similar under Tools > Options > Environment > Keyboard? The Edit.Duplicate command, which copies the current line into the editor though not to the clipboard, is excellent but only superficially similar to SCI_LINECOPY.
For me, without any additional adjustment, this is a normal process as shown in the pictures below.
When the cursor is in the line (1), I can copy it to the clipboard without selecting the text first using Strg+C.
Followed of course by Strg+V (2) or optional by step (3).

How to Auto-Alignment Shortcut Key in Keil uVision?

I want to find Auto-Alignment Shortcut Key in Keil uVision. I tried some shortcut keys but I can not find. In Visual Studio I used to: CTRL + K + D , but in keil uVision I don't know how it is work.
For example :
When you type below ( usually copied from another text file which was not tabified correctly):
Use the shortcut key Auto Alignment with this block of code can auto formatting your code as below :
Stop searching. There is no such feature.
Was able to align in uVision5 with Astyle (http://astyle.sourceforge.net/).
File must be saved so that this tool can do its work.
Instructions :
Copy the Astyle.exe file to the Keil installation directory (e.g. D:/Keil_v5/)
Then open Keil and under the Tools menu, open the Customize Tools Menu option.
Create a new Menu Content, the name can be casual .
Command selects the Astyle.exe file in the keil installation directory.
Fill in Arguments !E
You can add a shortcut key for the operation in Edit.
Cheers to this https://www.programmersought.com/article/578892324/

saving data with TextEdit

I want to use TextEdit to save data. what I have so far
tell application "TextEdit"
open /Users/UserName/Desktop/save.rtf
end tell
This gives me
"Expected “given”, “in”, “of”, expression, “with”, “without”, other parameter name, etc. but found unknown token."
and highlights the . in .rtf I tried removing the .rtf
but when I compile it it turns into
(open) / Users / username / desktop / (save)
This code gives "The variable Users is not defined."
also if possible can I have TextEdit run in the background without opening a window?
Put quotes around the path and use POSIX file to get a file object for the path:
tell application "TextEdit"
open POSIX file "/Users/UserName/Desktop/save.rtf"
end tell
You can modify the text of a document by changing the text property:
tell application "TextEdit"
set text of document 1 to text of document 1 & "aa"
end tell
It removes all styles in rich text documents. It also inserts the text as 12-point Helvetica in plain text documents, regardless of the default font.
Creating a new rtf file:
tell application "TextEdit"
make new document at beginning with properties {text:"aa"}
close document 1 saving in POSIX file "/tmp/a.rtf"
end tell
printf %s\\n aa | textutil -inputencoding UTF-8 -convert rtf -stdin -output a.rtf

how to disable bold font in vim?

i've removed all references to bold (gui=bold, cterm=bold, term=bold) in the color syntax file slate.vim but i still see some bolded text. for example in a python file, the keywords class, def, try, except, return, etc. are still in a bold blue font.
also how to disable bold in status messages, like "recording" or "Press ENTER or type command.."?
Instead of removing =bold references you should replace them by
gui=NONE
cterm=NONE
term=NONE
Put the following line in the .vimrc file.
set t_md=
Just in case someone is using iTerm on MacOS and also has this problem (since the same color scheme and vimrc settings under Ubuntu never gave me this problem), there is an option in iTerm under Preference->Profiles->text that stops iTerm from rendering any bold text. That's an easier and quicker fix.
try also to remove the occurrences of standout.
You can find highlighting groups by doing the following:
:sp $VIMRUNTIME/syntax/hitest.vim | source %
You can find where colors and font options were defined by doing:
:verbose highlight ModeMsg
(replace ModeMsg by your highlight group)
In vim, :scriptnames shows a list of all scripts loaded at vim startup.
In bash, grep -rl "=bold" $VIM shows a list of all files in your vim folder that contain that string. If $VIM is not set, or if you have a space in the filename (windows users), cd to your vim directory and run the command with . in place of $VIM
You can compare the two lists to find the files that need editing. Replace =bold with =NONE as stated in the previous answer by Tassos.
A side note: :hi Shows all current highlight formatting, with examples to demonstrate how the syntax is actually being rendered. In my case, standout had no effect on whether the font appeared bold.
Here's the easiest method:
In /colors directory enter sed -i 's/=bold/=NONE/g' *.vim
In /syntax directory enter sed -i 's/=bold/=NONE/g' *.vim
This will replace every instance in all those *.vim files.
For me, it was a tmux/screen issue. https://unix.stackexchange.com/questions/237530/tmux-causing-bold-fonts-in-vim led me to TERM=screen-256color which resolved my problem. It might also be worth exploring the difference when TERM is xterm vs. xterm-256color.
#devskii 's answer in the comment, above, works great for me. I'm going to include specifically the unbolding part here & wiki the answer. (If #devskii would like to make it an answer, I'll delete this... if I can delete wiki answers.)
Put this in your .gvimrc and smoke it:
" Steve Hall wrote this function for me on vim#vim.org
" See :help attr-list for possible attrs to pass
function! Highlight_remove_attr(attr)
" save selection registers
new
silent! put
" get current highlight configuration
redir #x
silent! highlight
redir END
" open temp buffer
new
" paste in
silent! put x
" convert to vim syntax (from Mkcolorscheme.vim,
" http://vim.sourceforge.net/scripts/script.php?script_id=85)
" delete empty,"links" and "cleared" lines
silent! g/^$\| links \| cleared/d
" join any lines wrapped by the highlight command output
silent! %s/\n \+/ /
" remove the xxx's
silent! %s/ xxx / /
" add highlight commands
silent! %s/^/highlight /
" protect spaces in some font names
silent! %s/font=\(.*\)/font='\1'/
" substitute bold with "NONE"
execute 'silent! %s/' . a:attr . '\([\w,]*\)/NONE\1/geI'
" yank entire buffer
normal ggVG
" copy
silent! normal "xy
" run
execute #x
" remove temp buffer
bwipeout!
" restore selection registers
silent! normal ggVGy
bwipeout!
endfunction
autocmd BufNewFile,BufRead * call Highlight_remove_attr("bold")

Resources