The keyboard shortcut to jump to a particular line in Xcode is Cmd+L
Typing in line number easily works, but what is the "symbol" in "Type Line Number or Symbol"? I tried typing selector names, variable names, nothing seems to work. Anybody knows what the "symbol" here is referring to and how to use it?
I think this feature is not working and will not, ever. In the upcoming Xcode 4.5 you will see just "Type Line Number" without the "or Symbol" part.
This very same question has been filed to Apple, but without answers.
It appears that the only thing this does is jump by line number within the file. The same question can be found in the apple forums, unanswered as well.
Taking a loot at the same function in Xcode 3.2 should make it rather easy to understand:
The 'symbol' in 'type in line number or symbol' should thus probably mean 'symbol number n'. E.g. typing 24 will take you to the 24th symbol (character) in the code.
As I don't have the newest Xcode I can't test to confirm this myself but I doubt they changed the functionality.
Related
Just experimenting with help in RStudio. So I type setwd? and the help comes up in another RStudio window. Now I type ls? ( at the console ) and all I get is "+". What's it expecting? I was told you don't need to put the () in and even if you do, same thing happens. I have to escape out of it. Shut down and startup...same problem and same ole' output from setwd?.
I'm on a MacBook air M1 macOS BigSur 11.3.1
It's expecting a string/object after the ? to search the prior type of files for. The characters before the ? it is treating as a type. If nothing is before the ? it searches all types of documentation: objects, packages, etc. Examples:
Is?is
Error in `?`(Is, is) :
no documentation of type ‘Is’ and topic ‘is’ (or error in processing help)
?"is"
?is
package?methods
When R is run interactively in a terminal which supports colors, it is possible to use ANSI escape sequences in order to put colors in the prompt, such as
options(prompt = "\033[0;31mThis is red\033[0m> ")
Unfortunately, something goes wrong because for long command lines, the line continuation override the prompt instead of being written in the next line.
The problem gets worse when using several colors, because somehow each escape sequence "takes up some space" in the command line, up to the point that the end of the prompt might overwrite the beginning. On my configuration this happens with for instance
options(prompt = paste("\033[0;31m With \033[0;32m multiple",
"\033[0;33m colors \033[0;34m this",
"\033[0;35m gets \033[0;36m really",
"\033[0;37m wrong! \033[0m"))
Why is it so? Is there a workaround?
PS: This rather old post seems related http://r.789695.n4.nabble.com/Xterm-escape-sequences-in-Prompt-td906375.html
update: with R version 3.6.0 and readline 8.0 (don't know which matters here), most of the above described problem disappeared, but some strange behaviors remain. Accepted answer below resolves everything.
you need to surround each «invisible» color code with special «marks»: \001 and \002:
options(prompt = "\001\033[0;31m\002This is red\001\033[0m\002> ")
for explanation see $ info readline (or this short answer).
Gábor Csárdi on the r-devel mailing list says that I cannot easily change this behavior (http://r.789695.n4.nabble.com/buggy-ANSI-escape-sequences-in-R-prompt-td4728671.html). The workaround he proposes is to use a two lines prompt, which suits me well enough.
I recently installed Zsh in hope of a better life and brighter mornings. However, I quickly realized Zsh introduces various issues in conjunction with tmux.
The first issue was some weird stuff happening at the end of the prompt, before my commands, but this was resolved by supplying tmux with the -u flag for unicode-support. However, I am stuck with one final issue that needs resolution before I can use Zsh with tmux:
Usecase: Autocomplete a command which contains multiple suggestions
Issue: Autocompletion shifts suggestion one character to the right, while leaving the original character behind (visual bug, it is not included in the command)
Example 1.
Then I hit TAB..
Example 2.
Then I hit TAB..
Note 1: This does NOT occur when using the Bash-shell.
Note 2: I am using "oh-my-zsh". This issue only occurs when using the provided themes. This narrows it down to an "oh-my-zsh"-theme issue, not native zsh/tmux.
In case some people still get a similar issue, see also the top-voted answer of Remnant characters when tab completing with ZSH. The plugin you were using may have had the same non-printable characters issue, that would explain the symptoms.
I've started using Xcode 4, and I'm really annoyed by some of the "features" especially those semantic warnings which don't seem to be making much sense, for example:
http://coding-journal.com/wp-content/uploads/2011/08/Screen-Shot-2011-08-07-at-8.50.46-PM.png
On line 640, you can see a semantic issue saying that I am passing an incompatible pointer type to a parameter of NSString *, which is just plain wrong because the signature of NSTabViewItems' initWithIdentifier: is:
- (id)initWithIdentifier:(id)identifier
My guess is that Xcode thinks that I am calling initWithIdentifer: on some other object, because when I Cmd+Click the method, it gives me three options:
http://coding-journal.com/wp-content/uploads/2011/08/Screen-Shot-2011-08-07-at-8.50.24-PM.png
And the first one, from NSTableColumn, has the signature
- (id)initWithIdentifier:(NSString *)identifier;
So my question is, what do I do in this situation? I like my code warning-free, but this doesn't seem to be possible when using Xcode 4 :(
I have Vim 7.2 installed on Windows. In GVim, the <C-PageUp> and <C-PageDown> work for navigation between tabs by default. However, it doesn't work for Vim.
I have even added the below lines in _vimrc, but it still does not work.
map <C-PageUp> :tabp<CR>
map <C-PageDown> :tabn<CR>
But, map and works.
map <C-left> :tabp<CR>
map <C-right> :tabn<CR>
Does anybody have a clue why?
The problem you describe is generally caused by vim's terminal settings not knowing the correct character sequence for a given key (on a console, all keystrokes are turned into a sequence of characters). It can also be caused by your console not sending a distinct character sequence for the key you're trying to press.
If it's the former problem, doing something like this can work around it:
:map <CTRL-V><CTRL-PAGEUP> :tabp<CR>
Where <CTRL-V> and <CTRL-PAGEUP> are literally those keys, not "less than, C, T, R, ... etc.".
If it's the latter problem then you need to either adjust the settings of your terminal program or get a different terminal program. (I'm not sure which of these options actually exist on Windows.)
This may seem obvious to many, but konsole users should be aware that some versions bind ctrl-pageup / ctrl-pagedown as secondary bindings to it's own tabbed window feature, (which may not be obvious if you don't use that feature).
Simply clearing them from the 'Configure Shortcuts' menu got them working in vim correctly for me. I guess other terminals may have similar features enabeld by default.
I'm adding this answer, taking details from vi & Vim, to integrate those that are already been given/accepted with some more details that sound very important to me.
The alredy proposed answers
It is true what the other answer says:
map <C-PageUp> :echo "hello"<CR> won't work because Vim doesn't know what escape sequence corresponds to the keycode <C-PageUp>;
one solution is to type the escape sequence explicitly: map ^[[5^ :echo "hello"<CR>, where the escape sequence ^[[5^ (which is in general different from terminal to terminal) can be obtained by Ctrl+VCtrl+PageUp.
One additional important detail
On the other hand the best solution for me is the following
set <F13>=^[[5^
map <F13> :echo "hello"<CR>
which makes use of one of additional function key codes (you can use up to <F37>). Likewise, you could have a bunch of set keycode=escapesequence all together in a single place in your .vimrc (or in another dedicated file that you source from your .vimrc, why not?).