I've been using Rstudio for a few weeks now, and the tab completion has worked inconsistently for me. For example:
my_variable = 10
my_va
Those are the only two lines in my R-script. When I press tab to use completion, a small message appears next to the text bar saying "(No matches)", when I believe it should find the matching variable called "my_variable" in the line above.
Does anyone know how to use tab completion in Rstudio?
RStudio looks at the workspace and the packages loaded to try to do the tab-completion. If you haven't run the first line then RStudio won't recognize that you want to complete to "my_variable".
If you run your first line then RStudio will be able to tell that you have a variable called my_variable and will offer to complete it to that.
You can read a little bit more in the RStudio documentation.
Related
I've just started using Quarto for first time in RStudio (I usually use Rmarkdown).
In Rmarkdown, I could select a line from a code chunk and use Ctrl + ⏎ to evaluate it in the global environment. This was useful because it let test the behaviour of a line without requiring me to knit the document or run the entire chunk.
This shortcut does not work in Quarto documents in RStudio. Is there different keyboard shortcut which will let me a evaluate a single line from a chunk of code in a Quarto document?
Edit: some people are saying that the old shortcut should still work, so maybe this is a bug? I'll update this question when I know more (or perhaps delete the question and submit an issue should the need arise)
Currently using
R version 4.2.1 (2022-06-23 ucrt)
RStudio version 2022.07.1+554 (Spotted Wakerobin)
This is an RStudio bug on Windows 10
There's a known issue with Rstudio and the Quarto visual editor where pressing Ctrl + ⏎ from a 'floating' window results in no code being evaluated, or code in a different window being evaluated. It's part of a wider bug where the connection between floating windows and the main window is severed.
The issue is due for repair in 2024. Until, then you'll need to do the following to restore normal shortcut functionality:
'Re-dock' the window you're editing using the 'Return to main window' button:
Close all other 'floating' windows
Restart RStudio. Close the process completely; restarting the session will not work.
I am currently using Visual Studio Code for my local development. I use the terminal for commands but have realized it will sometimes input something like ^[[A instead of the last command I ran when I hit the up button. This is occurring on Bash and my zsh terminal. I am using a Mac as well. Is there any further configuration I need to do in order to show my last command and not this weird symbol that keeps showing up?
The command shows up like this
Okay, I think this solution helped: https://stackoverflow.com/a/40347121/19633998
Basically all boils down to what sort of configuration your terminal has. Mine was defaulted to bin/zsh. Changed it to bin/bash and it seems to be working at the moment.
I'm using windows 10 and installed cmder, using the fish shell with omf Theme fishface.
But every new row, it will show a new row Mark as this picture. Screenshot for new row mark
How can I get rid of this mark?
** didn't work if I change to another theme too.
Additional information without cmder.
Screenshot with cmd.exe + bash + fish
You can't disable that feature. The fish shell uses a heuristic (inherited from zsh) to determine if the output of the preceding command ended with a newline. If it doesn't it displays the Unicode U+23CE symbol (what you're seeing) or a tilde. Search the code for the symbol PROMPT_SP. Commit 58347d49 that I wrote and merged 2016-12-23 fixed that behavior for the Windows ConEmu terminal emulator. See issue 789. Based on your problem description it appears that heuristic does not work correctly in the cmder terminal. This probably means that terminal emulator has a bug since it doesn't behave like nearly all the terminals that fish runs on. Feel free to open an issue
I'm on OS X and I've installed Vim using Homebrew via
brew install vim
I noticed that whenever I use Vim, there is no status line appearing at the bottom. I thought I could fix it by always displaying the status line by adding the following to vimrc:
:set laststatus=2
This shows me the status line but it's just an empty line above the ruler. It looks like this:
Am I missing something?
EDIT
I want to use Vim for Haskell. I've installed haskell-vim-proto. I'm using the included included vimrc which should result in showing things like syntax errors in the status line. When I edit Haskell files (with the vimrc), there is no status bar in my Vim. Adding set laststatus=2 to the vimrc results in a blank status line showing.
When I'm following tutorials that install Vim through HomeBrew (as I did), opening any time of file with Vim shows the status line at the bottom containing things like this:
I'm literally following this tutorial. When he opens .bash_profile with Vim, it looks like this:
When I do the exact same thing, it looks like this:
The guy who made that tutorial made a very big and very common mistake: he is using a heavily customized Vim instead of vanilla Vim. This rather obviously gives new users wrong expectations.
Basically, everything you see in that first screenshot:
colorful pseudo-tabline
colorful statusline
colorscheme
relative line numbers
is either provided by one or more plugins that the author failed to mention or by a built-in option that he also failed to mention.
If you absolutely need an "always-on" statusline, follow #dNitro's suggestion.
If you absolutely want the exact same setup as the author (which is not a very good idea in and of itself), I'd suggest you contact him directly. People should take full responsibility of the crap they put online.
Status line by default is just like that gray line and will always remains there as long as you set laststatus=2.
What you are missing is formatting this line to show the items you want it to show you. you can do it manually yourself. just add the following to .vimrc and see what happens:
set statusline=%F%m%r%h%w%=\ [%Y]\ [%{&ff}]\ [%04l,%04v]\ [%p%%]\ [%L]
to decipher see: :help statusline and add your desired items.
Or use a plugin: vim-airline and lightline.vim are two popular one.
I am looking for a way to have my Notepad++ window open for editing my code and run it line by line or by sections (more than 1 line) while I am editing. It would be like having a real IDE; the output could be shown in the same window (Notepad++) or directly in the Octave window.
I have tried what many many sites say. That is, writing this:
C:\Software\Octave-3.6.4\bin\Octave\Octave-3.6.5.exe "$(FULL_CURRENT_PATH)"
in the Run window in Notepad++, saving and giving it a shortcut. However, it is still not working. When I tried to run it, the black window starts showing-up but then it disappears and nothing else happens. In my Notepad++ window I have only one line (for now) where I have tried just "b=4" or "3*4". I have done this with and without semicolon at the end. Nothing happens.
I have Windows 8.0, Notepad 6.5.5 and Octave-3.6.4. I already change the octaverc file in Octave to make it work with Notepad++. I have work already only in the command line in Octave and is working fine. The Octave I installed was exactly "octave-3.6.4-vs2010-setup", it says it was compiled for Visual Studio 10. Is that the reason why this is not working?
Any help will be appreciated...
regarding Octave not processing the command: use supposed command line outside the N++ and see if it works. If not, find a way to make it working, then transfer it back to N++ (and use the token "$(FULL_CURRENT_PATH)" instead of concrete filename)
regarding running the code in smaller portions: if you app can accept the code directly in the command line (SQL command line tools I use can do this), then you can use token "$(CURRENT_WORD)" what stands for content of current selection (all tokens are in wiki)