Code Monkey home page Code Monkey logo

link's Introduction

This package is now a part of the core Atom repository, please direct all issues and pull requests there in the future!


Link package

macOS Build Status Windows Build Status Dependency Status

Opens http(s) links under the cursor.

Commands and Keybindings

Command Selector Description Keybinding (Linux) Keybinding (macOS) Keybinding (Windows)
link:open atom-text-editor Opens the http(s) link under the cursor ctrl-shift-o

Custom keybindings can be added by referencing the above commands. To learn more, visit the Using Atom: Basic Customization or Behind Atom: Keymaps In-Depth sections of the Atom Flight Manual.

link's People

Contributors

50wliu avatar abahgat avatar damieng avatar daviwil avatar jasonrudolph avatar kevinsawicki avatar lee-dohm avatar maxbrunsfeld avatar mcolyer avatar mnquintana avatar probablykevin avatar uzitech avatar zcbenz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

link's Issues

Cannot open markdown link

Prerequisites

Description

Cannot open markdown link

Steps to Reproduce

  1. Create markdown file
[GitBook on GitHub](https://github.com/GitbookIO)
https://github.com/GitbookIO
  1. hover link in line 1 (character 26 to 49)
  2. Trigger "Link:Open" in Command Palette

Expected behavior: [What you expect to happen]

Link opened in browser

Actual behavior: [What actually happens]

Nothing happened

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

$ atom --version
Atom : 1.17.2
Electron: 1.4.16
Chrome : 53.0.2785.143
Node : 6.5.0

$ apm --version
apm 1.18.2
npm 4.6.1
node 8.0.0 x64
python 2.7.13
git 2.13.0

$ apm ls | grep link
├── [email protected]
├── [email protected]

Additional Information

Note bare link in line 2 works

Link: Open does not work when link is selected

This seems not to work only on md files. For example, when in markdown mode, select the URL in parentheses and try to open it. The active token will be ')' and fail to open the link.

See [atom/metrics](https://github.com/atom/metrics) for details.

I'm still opening the issue here since my expectation as a user is that, when any text is selected, it is the selection that I want to open as a link.

What do you guys think?

Command doesn't show up in the keybindings editor

The link:open command doesn't show up in the keybindings editor, even if that command is available through the command palette as "Link: Open". I see that the command is exported as:

atom.commands.add('atom-workspace', 'link:open', openLink)

I can change the keybindings manually by editing my keymap.cson file, but for some reason that command doesn't show up in the keybindings editor.

Context

  • OS: Kubuntu Linux 14.04.2 LTS (64 bit)
  • Atom: 1.0.0
  • Link package version: 0.30.0

Can't open links that has hashbangs(#!)

When I try to open this I can't: http://twitter.com/#!/SomeUsername

When I click somewhere after # (a position after #) and do link:open, I can't open link.

When I click somewhere before # and do link:open, it opens link incorrectly: http://twitter.com/ without including after #

2nd example: https://github.com/#asd/qwehttps://github.com/#asd/qwe (Works!)
3rd example: https://github.com/#!asd/qwehttps://github.com/ (Nope!)
4th example: https://github.com/asd/qwe#asdhttps://github.com/asd/qwe#asd (Works!)

Edit: I'm using Atom v0.194, Win7 64-bit

Keybinding conflict

Hello,

The keybinding Ctrl-Shift-O is already taken by the core function "Open Folder...", at least in the official Linux .deb build. This breaks the link package, one of the two key combinations has to be changed.

Thanks!

Cannot open markdown link, Plugin conflicts

Description

Cannot open markdown link. The real cause of the problem is a conflict between burodepeper/language-markdown and atom/link

Steps to Reproduce

  1. Install this plugin -> https://github.com/burodepeper/language-markdown
  2. Install this plugin -> https://github.com/atom/link/
  3. Make sure both plugins are enabled at the same time
  4. Create and open a new markdown file
  5. Add link , for example
source : <https://github.com/GitbookIO>

[GitBook on GitHub](https://github.com/GitbookIO)

<https://github.com/GitbookIO>

[testLink1](https://github.com/GitbookIO)
  1. Save file
  2. Use command pallet to run link: open

Expected behavior:
Link opened in default browser chromium.

Actual behavior:
Nothing happens, no error, nothing.

Reproduces how often:
Always when both plugins are enabled at the same time.

Versions

Atom : 1.22.1
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0

(node:24571) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
apm 1.18.11
npm 5.6.0
node 9.3.0 x64
atom 1.22.1
python 2.7.14
git 2.15.1

OS Manjaro Linux , everything is latest and up to date

Additional Information

#24
This issue was opened by me, it was closed because it did not provide enough information. I did not provide information because I thought markdown links are not supported by this plugin and developer will understand. The real cause of the problem is a conflict between burodepeper/language-markdown and atom/link

#23
This issue was opened by another github user , it was closed because user was not able to provide enough information about the cause of this problem.

<unknown> is deprecated.

You have the core package "link" installed as a community package. See https://github.com/atom/dalek for how this causes problems and instructions on how to correct the situation.

<unknown> (<embedded>:13400:20)
Generator.next (null:null:null)
step (<embedded>:13387:279)
<unknown> (null:null:null)
process._tickCallback (internal/process/next_tick.js:109:7)

`atom://` URLs are not supported

Prerequisites

Description

MD preview and MD datatips (hovers) don't support atom/core URL handlers from #15935. The code in lib/link.js openLink method suggests that only http and https are supported at the moment and aligns with what I'm seeing as well.

Steps to Reproduce

See atom/atom#16888

Expected behavior:
MD link [This is a link](atom://core/open/file?filename=<path to file>) should open atom editor for the specified file

Actual behavior:
Nothing happens

Reproduces how often:
100%

Versions

All verions up to 1.25-beta2

Additional Information

I have of course tried creating a patch for this issue by having the code below in the openLink() method:

    if (protocol === 'atom:') atom.uriHandlerRegistry.handleURI(link)
    else if (protocol === 'http:' || protocol === 'https:') shell.openExternal(link)

However, I don't think i can simply perform apm link . for this package... First of all it still doesn't work after this change and the linking... I don't see the source for this package at all and can't debug. Feels like i can't link it or perhaps it's not used for the behaviour I'm trying to fix?

"ctrl-shift-o" opens "Open Folder" dialog

In my freshly installed Atom v0.192.0,
Atom Link is enabled by default, yet when I press ctrl-shift-o, Atom shows Open Folder dialog.

When I look at the settings, it shows me that ctrl-shift-O (mind you, O is capitalized) is binded to application:open-folder

I had to open my keymap.cson file and add this to make it work:

'atom-workspace':
  'ctrl-shift-w': 'link:open'

I have Windows 7 (64-bit)

Links with underscores get cut off

If any part of an HTTP(s) URL includes an underscore, then everything after the underscore gets cut off from the URL that is opened. For me this includes Google Docs URLs and lots of the local business systems I have to deal with.

A simple example: https://twitter.com/_
This goes to the twitter home page instead of the profile page for the user @_

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.