Binding function keys in carbon-emacs - carbon-emacs

While I was using the "normal" X11 emacs under Snow Leopard, my profile.el file had a line:
(global-set-key [f14] 'my_function)
However this binding does not work with carbon-emacs. What is strange is that if I execute the command "M-x global-set-key", and give it the right arguments (pressing the F14 key), it works!
Any hints?
-- Tsf

My line
(global-set-key [f14] 'my_function)
was in an auxiliary profile.el file loaded by the command
(load "profile")
in my .emacs file. When I moved it to the .emacs file itself, it worked! As a matter of fact the same happened with another definition I was having troubles with:
(setq visible-bell t)
used to disable unpleasant sounds.
-- Tsf

I'm using the normal gnu emacs for mac, probably from one of the vanilla builds..., and [f14] works fine for me... why are you using a non-standard emacs?
Granted, i'm using emacs 22, so maybe things changed, but I doubt it...

Related

How do I get my neovim settings to work properly and actually save

I just installed nvim for the first time, this is also my first time using a terminal based code editor, and I'm migrating from VSCode (ik it's going to be hard),
and now I'm configuring it, I'm following this tutorial:
https://www.youtube.com/watch?v=vdn_pKJUda8&t=347s&ab_channel=JoseanMartinez
And when put the code in the options.lua file, it does not do anything, for example, the
opt.relativenumber = true
is not doing anything
I have tried running commands to change settings, and that has worked, for example
:set relativenumber
But as soon as I exit the file and open a new one, it just breaks again
I have tried simply copy and pasting the code, restarting nvim, switching terminal emulators, etc.
It's really annoying because I am trying to get rid of this stupid feature where it continues comments to the next line and I have to run like 50 commands every time I open a new file just so I can edit it the way I want
My .config file is in
C:\Users\brady\.config
and my nvim.exe file is in
C:\Users\brady\nvim-win64\bin
I am on Windows 10 and my terminal emulator is called 'Tabby'
I figured it out! All the tutorials I am watching are on Linux, but I am on Windows. So instead of putting the nvim folder in my .config, I am supposed to put it in C:\Users\brady\AppData\Local
Are you sure that you're adding your nvim-config file in the correct directory? I'd assume that you need to add your init.vim into C:\Users\brady\.config\nvim\init.vim.
Maybe this answer helps you.

Intellij IDEA terminal running oh-my-zsh not correctly mapping these specific keys

Environment:
MacOS
Intellij IDEA Terminal
oh-my-zsh
While trying to execute a backwards or forwards word jump using the alt-<back arrow> or alt-<front arrow> combination, I get OD or OC instead. I've tried:
A picture of my settings in IDEA
"shell integration" in idea terminal settings on and off. This seems to only remove the O from the output.
"Override IDE shortcuts", as well as various others on this screen
sourcing a new .inputrc to include the jumping keystrokes. this doesn't really make sense, however since if I switch to bash the jumping motion works.
Additional notes:
alt-<backspace> works

Vim hotkeys for pdf-tools in emacs?

Does anyone know how to get vim hotkeys inside pdf-tools for emacs?
I have found out it comes standard with spacemacs, but can't find any documentation to get the hotkeys with regular emacs. Thanks in advance if you can point me to the right direction.
PS. I am using EVIL mode, emacs 24, arch linux.
Spacemacs seems to simply bind the keys they want to the respective pdf functions:
https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Btools/pdf-tools/packages.el#L40
They obviously use their own spacemacs way of defining keybindings, but you can just copy the keys and functions and set them however you want.
Use the evil collection package, which has a special setup to use vim keybindings in pdf-tools. Although, you must take into consideration that you would have some issues with strange pdf blinking behavior. For fixing that, I mix the info I found here and here:
(add-hook 'pdf-view-mode-hook
(lambda ()
(set (make-local-variable 'evil-normal-state-cursor) (list nil))
(internal-show-cursor nil nil))
))
Nonetheless, the pdf will start blinking when you highlight part of the pdf. Hope this help!

Can't type in IntelliJ

I'm using IntelliJ IDEA on my Mac to work on a project, and I keep on coming across an issue where I can't type. Occasionally when I switch to another application and then switch back to IntelliJ I can't type anything, and the cursor doesn't appear on text when I click on things. Does anyone know what causes this? After 1-2 minutes it goes back to normal, but it's started happening more frequently and it's pretty frustrating to not be able to type and have no way to fix it.
This is the version of IntelliJ I'm using:
IntelliJ IDEA 2016.1.3
Build #IC-145.1617, built on June 3, 2016
JRE: 1.8.0_76-release-b198 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Turn off Vim Emulator from Tools in the IntelliJ, like this picture:
I am encountering this issue aswell, ...
MAC os Mojave 10.14.2, Inteliij Community 2018.3.5
Aside from restarting / clearing caches, I found that cmd + leftShift + F still opens the search window, and all my keystrokes appeared in the searchbox!
After the searchshortcut, I was able to close the searchbox and work again!
The answer here helped me https://intellij-support.jetbrains.com/hc/en-us/community/posts/206152119-Can-t-type-in-editor-window
Quoting the author of the answer:
I had the same problem. It goes away after I click the icon at top of
the scroll bar. it happens frequently on windows 7/10, and
occasionally on mac. my colleagues said they have experienced it too
Have the same issue occasionally, can't type in any Intellij windows. My temporary/quick fix, is to:
Close any terminal windows in intellij
Use cmd+shift+f to pull up the search window.
Seems to fix it, for a while.
Closed IDEA, all IDEA projects! Even though in other IDEA windows I could type.
Removed .idea folder in the project I could not edit.
Restarted IDEA.
Then I was able to type!
Maybe you entered Vim emulator as said. Maybe only by mistake :).
Control-V is a frequently used shortcut. And Control-Alt_V is the shortcut to enable Vim mode so you can see the problem...
How to know in five seconds: type a ":" (colon) and if the cursor jump to end of the screen, that is vim. If so enter q to quit and then Control-Alt-V (on windows) to go back to IDEA standard mode.
vi is a powerful text editor since ever. But only if you pretend and know how to use it... There is even a warning on the IDEA install saying like "do not install unless you are familiar with Vim" in yellow bold text, iirc.
[Follows historic data, that you may find boring off-topic or interesting]
Today's editors opens the code in edit mode right away so you can start typing over existing code. Vim by the other hand opens the code in, let us say, browsing mode: there is a set of navigation keys to browse the code. Everything you type is supposed to be a command. When you want to edit you enter INSERT mode and then you can type new text. Only then.
Just for more historic data: vi navigation mode is great for studying code you do not know, using IDEA, since it does not change the text unless you tell it to, and some vi commands are clever.
One example:
"/" (forward slash) is one search command, and "z" is a smart scroll command so that:
/setCellFactory will search for the next match of "setCellFactory" and put the cursor there
Then if you type "z" the code will be positioned so that line is the first on screen. And if you type "." the line will be at the middle. And if you type "-" that line will be at the last position at the screen. And you can use these commands again and again. And new slash will go for the next match, like F3
This "z" thing is a feature I miss in Visual Studio, IDEA, Eclipse, Word, WordPad: these commands to scroll text AROUND a pattern... /pattern, z, z., z-. The alternative is the mouse wheel...
I am used to vi since the 80's and is the editor I still use today on Linux terminals so when this happened to me on IDEA I was lucky to remember and suspect of that on the first time.
Sorry if these details are boring
Ensure you haven't unintentionally enabled vim emulation. Go to IntelliJ Idea -> Preferences and select Plugins. Scroll down and look for the vim emulation plugin and if it's checked, then either uncheck it or uninstall it completely.
Ran into same issue with intelliJ 2017.1.2, but no VIM Plugin. However, I had just created an empty project with some .groovy files. I could edit the files in the groovy project, but not java projects.
Only way I could fix java projects, was blow-away workspace.xml files in each, then I could edit again. However, had to re-create tomcat configs, breakpoints, other IDE settings. etc.
I had a problem with entering characters when working with .story files. When I tried to type in any character, it appeared for a short while and immediately disappeared. The cause of the problem was jbehave plugin I was using. After uninstalling it and restarting IntelliJ everything was fine.
It seems to be because another window has the cursor and is not giving it back.
Check any open floated windows, click on them & then click back to your intellij instance
alternatively, if you have multiple intellij instances open the cursor could be there...
Go to the most recently opened IntelliJ instance
Check if the cursor has become stuck in that project's terminal window, or another window
no? check all other open IntelliJ instances
For me it happened because of vim
Om Mac, I solved it by navigating to File → Reload All from Disk.
Keyboard shortcut: ⌥ ⌘ Y
IntelliJ IDEA 2020.1.4
Try disabling plugins one at a time. It was the "BashSupport Pro" plugin that caused it for me. Disabled it and I could type again right away.
I read other comments saying some other plugins caused the issue as well.

vs2012 shortcut keys for moving lines of code

what are shotcut keys in vs2012 ,which to copy a line of code then move down or up,and cut a line of code then move down or up??
the copy version:
printf("hello world");// press a shotcut key ,then ..
printf("hello world");// this line of code automaticly appear here.
the cut version:
printf("hello you");//press a shotcut key ,then this line **will be cut**,and then ..
printf("hello you");//this line of code automaticly appear here.
is there any shotcut key exists likes them?
Shift-Alt-T moves the line with the cursor down one line, I'm still trying to figure out how to move it up.
So after a little bit of googling it doesn't seem that VS has a keyboard shortcut to move a line up, which is quite baffling since the do have the above mentioned shortcut to move a line down. Anyway, you're definitely not the only one who wants this functionality and there are a few suggestions to this.
Either install this extension (free):
MoveLine extension
Or you could install ReSharper which is really, really nice in my opinion:
ReSharper
You should try this explanation below:
http://www.herrodius.com/blog/52
The Visual Studio Productivity Power Tools extension adds support for this. It's the "Move Line Up/Down Commands" feature.
With this feature enabled Alt+↑ and Alt+↓ move the current line (or multi-line selection) up or down.
Usually the first thing I do when set up visual studio is install this extension, then turn off all the other rubbish it adds (weird document tabs, scrollbar etc) just for the move up and down